Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(Examples): Cats&Dogs model parameters updated for MAX78000 demos #735

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
383 changes: 4 additions & 379 deletions Examples/MAX78000/CNN/cats-dogs/.vscode/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Examples/MAX78000/CNN/cats-dogs/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@
]
}
]
}
}
6 changes: 4 additions & 2 deletions Examples/MAX78000/CNN/cats-dogs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"terminal.integrated.env.windows": {
"Path":"${config:OCD_path};${config:ARM_GCC_path}/bin;${config:xPack_GCC_path}/bin;${config:Make_path};${env:PATH}",
"Path":"${config:OCD_path};${config:ARM_GCC_path}/bin;${config:xPack_GCC_path}/bin;${config:Make_path};${config:MSYS_path}/usr/bin;${env:PATH}",
"MAXIM_PATH":"${config:MAXIM_PATH}"
},
"terminal.integrated.defaultProfile.windows": "Command Prompt",
Expand Down Expand Up @@ -33,7 +33,8 @@
"OCD_path":"${config:MAXIM_PATH}/Tools/OpenOCD",
"ARM_GCC_path":"${config:MAXIM_PATH}/Tools/GNUTools/${config:v_Arm_GCC}",
"xPack_GCC_path":"${config:MAXIM_PATH}/Tools/xPack/riscv-none-elf-gcc/${config:v_xPack_GCC}",
"Make_path":"${config:MAXIM_PATH}/Tools/MSYS2/usr/bin",
"Make_path":"${config:MAXIM_PATH}/Tools/GNUTools/Make",
"MSYS_path":"${config:MAXIM_PATH}/Tools/MSYS2",

"C_Cpp.default.includePath": [
"${workspaceFolder}",
Expand All @@ -55,6 +56,7 @@
],
"C_Cpp.default.browse.path": [
"${workspaceFolder}",
"${config:MAXIM_PATH}/Libraries/Boards/${config:target}/Source",
"${config:MAXIM_PATH}/Libraries/Boards/${config:target}/${config:board}/Source",
"${config:MAXIM_PATH}/Libraries/PeriphDrivers/Source",
"${config:MAXIM_PATH}/Libraries/MiscDrivers/Camera",
Expand Down
996 changes: 505 additions & 491 deletions Examples/MAX78000/CNN/cats-dogs/cnn.c

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions Examples/MAX78000/CNN/cats-dogs/cnn.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ typedef int16_t q15_t;
Layer 6: 2,048 ops (2,048 macc; 0 comp; 0 add; 0 mul; 0 bitwise)

RESOURCE USAGE
Weight memory: 57,776 bytes out of 442,368 bytes total (13%)
Bias memory: 2 bytes out of 2,048 bytes total (0%)
Weight memory: 57,776 bytes out of 442,368 bytes total (13.1%)
Bias memory: 2 bytes out of 2,048 bytes total (0.1%)
*/

/* Number of outputs for this network */
Expand All @@ -77,10 +77,9 @@ typedef int16_t q15_t;
#define SYS_COMPLETE LED_Off(0)

/* Run software SoftMax on unloaded data */
void softmax_q17p14_q15(const q31_t *vec_in, const uint16_t dim_vec, q15_t *p_out);
void softmax_q17p14_q15(const q31_t * vec_in, const uint16_t dim_vec, q15_t * p_out);
/* Shift the input, then calculate SoftMax */
void softmax_shift_q17p14_q15(q31_t *vec_in, const uint16_t dim_vec, uint8_t in_shift,
q15_t *p_out);
void softmax_shift_q17p14_q15(q31_t * vec_in, const uint16_t dim_vec, uint8_t in_shift, q15_t * p_out);

/* Stopwatch - holds the runtime when accelerator finishes */
extern volatile uint32_t cnn_time;
Expand Down
Loading