RISC-V ããã»ããµHiFive1ã使ã£ã¦ãæ©æ¢°å¦ç¿ã®ãã¥ã¼ããªã¢ã«ã¨ãè¨ããMNISTã®ããã°ã©ã ãåä½ããããã ã¾ãã¯MNISTã®æ¨è«ã³ã¼ãèªèº«ãããHiFive1ã«ç§»æ¤ãã¦ããã
å½ããåã¨è¨ãã°å½ããåã ããè¡åæ¼ç®ã®éä¸ã®ãã¼ã¿ã¨ããå ¨é¨L1ãã¼ã¿ãã£ãã·ã¥ã§ãããããã訳ã ããããã¾ã大ããªããã°ã©ã ããã¼ããããã¨ã¯ã§ããªãã ããã¾ã§å¤§ããªããã°ã©ã ãåããã¦éä¸ã§ã¯ã©ãã·ã¥ãã¦ãã¼ããåããªããªã£ã¦ããã®ã¯ãããã§ã¯ãªããã¨äºæ³ã ããã§ãããã¾ã§ã«é¢æ°å ã§ç¢ºä¿ãã¦ããè¡åæ¼ç®ã®éä¸ã®å¤æ°ããä»®ã«ã§ãããã®ã§ã°ãã¼ãã«å¤æ°ã¨ãã¦ç¢ºä¿ããããããã使ç¨ãããã¹ã¦ã®å¤æ°ã確ä¿ãã¦ãããã
diff --git a/software/mnist/train_twolayernet_fix16.c b/software/mnist/train_twolayernet_fix16.c index d35e94f..0802eff 100644 --- a/software/mnist/train_twolayernet_fix16.c +++ b/software/mnist/train_twolayernet_fix16.c @@ -25,7 +25,7 @@ #define ALPHA (10) // Coefficient of learning #define SEED (65535) // Seed of random #define MAXINPUTNO (60000) // Max number of learning data -#define BATCH_SIZE (100) +#define BATCH_SIZE (10) #define LEARNING_RATE (0.1) #define WEIGHT_INIT (0.01) @@ -286,6 +286,13 @@ int main () return 0; } +fix16_t af0 [BATCH_SIZE * HIDDENNO]; +fix16_t in_data[BATCH_SIZE][INPUTNO]; +fix16_t af1 [BATCH_SIZE * OUTPUTNO]; +fix16_t rel0[BATCH_SIZE * HIDDENNO]; +fix16_t rel1[BATCH_SIZE * OUTPUTNO]; + + void TestNetwork (const int input_size, const int output_size, const int hidden_size,
ããã¨ãã¯ããL1ãã£ãã·ã¥ã«ã¯åã¾ãããããªã³ã¯æã«ã¨ã©ã¼ãçºçãããã¨ããããåä½ãããããã«ã§ãããã¨ã¨è¨ãã°ãããããµã¤ãºãæ¸ããã¦ãã¼ã¿ãµã¤ãºãæ¸ãããã¨ãªã®ã§ãããããµã¤ãºã1ã¾ã§æ¸ããã¨ãªã³ã¯ã¾ã§æåããã
ä¸å¿ã¯ã©ãã·ã¥ããªãããã«ãªã£ãããã¾ã ãã¼ã¿ãå ¥åãã¦ããªãã®ã§ãããã¯ä¿®æ£ãã¦ãããªãã¨ãããªãã ããã¦ããèããã¨åè¡åã¹ãã¼ã¸ã§å¥ã ã«å¤æ°ãç¨æããå¿ è¦ããªãããã§ãããã¡ãã£ã¨ãã¼ã¿ãµã¤ãºæ¸ãããªãããªãã
/home/msyksphinz/work/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/7.1.1/../../../../riscv64-unknown-elf/bin/ld: mnist ã»ã¯ã·ã§ã³ `.bss' ã¯é å `ram' å ã«å ¥ãã¾ãã /home/msyksphinz/work/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/7.1.1/../../../../riscv64-unknown-elf/bin/ld: section .stack VMA [0000000080003800,0000000080003fff] overlaps section .bss VMA [0000000080000a48,0000000080009817] /home/msyksphinz/work/freedom-e-sdk/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/lib/gcc/riscv64-unknown-elf/7.1.1/../../../../riscv64-unknown-elf/bin/ld: é å `ram' ã 0 ãã¤ã溢ãã¾ãã collect2: error: ld returned 1 exit status /home/msyksphinz/work/freedom-e-sdk/bsp/env/common.mk:44: ã¿ã¼ã²ãã 'mnist' ã®ã¬ã·ãã§å¤±æãã¾ãã make[1]: *** [mnist] ã¨ã©ã¼ 1 make[1]: ãã£ã¬ã¯ã㪠'/home/msyksphinz/work/freedom-e-sdk/software/mnist' ããåºã¾ã Makefile:199: ã¿ã¼ã²ãã 'software' ã®ã¬ã·ãã§å¤±æãã¾ãã make: *** [software] ã¨ã©ã¼ 2