diff --git a/demo/lenet.c b/demo/lenet.c index a207255..9e11992 100644 --- a/demo/lenet.c +++ b/demo/lenet.c @@ -73,14 +73,14 @@ int main(int argc, const char *argv[]) /* Parameters */ cc_tensor_t *conv1_w, *conv1_b, *conv2_w, *conv2_b, *fc1_w, *fc1_b, *fc2_w, *fc2_b; - cc_int32 shape_conv1_w[] = {5, 5, 1, 32, 0}; + cc_int32 shape_conv1_w[] = {32, 1, 5, 5, 0}; cc_int32 shape_conv1_b[] = {32, 0}; - cc_int32 shape_conv2_w[] = {5, 5, 32, 64, 0}; + cc_int32 shape_conv2_w[] = {64, 32, 5, 5, 0}; cc_int32 shape_conv2_b[] = {64, 0}; cc_int32 shape_flat[] = {-1, 1, 1, 0}; - cc_int32 shape_fc1_w[] = {1, 1, 3136, 128, 0}; + cc_int32 shape_fc1_w[] = {128, 3136, 1, 1, 0}; cc_int32 shape_fc1_b[] = {128, 0}; - cc_int32 shape_fc2_w[] = {1, 1, 128, 10, 0}; + cc_int32 shape_fc2_w[] = {10, 128, 1, 1, 0}; cc_int32 shape_fc2_b[] = {10, 0}; arg_parser(argc, (char**)argv); diff --git a/demo/lenet_pack.c b/demo/lenet_pack.c index 310f2bf..b2a87c6 100644 --- a/demo/lenet_pack.c +++ b/demo/lenet_pack.c @@ -66,13 +66,13 @@ int main(int argc, const char *argv[]) { cc_int32 i = 0; char filepath[256]; - cc_int32 shape_conv1_w[] = {5, 5, 1, 32, 0}; + cc_int32 shape_conv1_w[] = {32, 1, 5, 5, 0}; cc_int32 shape_conv1_b[] = {32, 0}; - cc_int32 shape_conv2_w[] = {5, 5, 32, 64, 0}; + cc_int32 shape_conv2_w[] = {64, 32, 5, 5, 0}; cc_int32 shape_conv2_b[] = {64, 0}; - cc_int32 shape_fc1_w[] = {1, 1, 3136, 128, 0}; + cc_int32 shape_fc1_w[] = {128, 3136, 1, 1, 0}; cc_int32 shape_fc1_b[] = {128, 0}; - cc_int32 shape_fc2_w[] = {1, 1, 128, 10, 0}; + cc_int32 shape_fc2_w[] = {10, 128, 1, 1, 0}; cc_int32 shape_fc2_b[] = {10, 0}; arg_parser(argc, (char**)argv); diff --git a/src/cc_conv2d.h b/src/cc_conv2d.h index 55ffde9..e192165 100644 --- a/src/cc_conv2d.h +++ b/src/cc_conv2d.h @@ -9,10 +9,10 @@ #define CC_CONV2D_PAD_NAME_SURFFIX "_pad" enum cc_conv2d_kernel { + CC_CONV2D_KERNEL_O, + CC_CONV2D_KERNEL_I, CC_CONV2D_KERNEL_H, CC_CONV2D_KERNEL_W, - CC_CONV2D_KERNEL_I, - CC_CONV2D_KERNEL_O, CC_CONV2D_KERNEL_DIM };