Skip to content

Commit

Permalink
cclua
Browse files Browse the repository at this point in the history
  • Loading branch information
i-evi committed Oct 3, 2020
1 parent 1962ce1 commit d02985b
Show file tree
Hide file tree
Showing 4 changed files with 8,269 additions and 1 deletion.
22 changes: 22 additions & 0 deletions demo/lenet.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
loadfile("./util/lua2cc.lua")()

network = {
networkName = "lenet",
createScope = "lenet",
parameterLv = 0,
inputLayers = {"in"},
outputLayers = {"out"},
l1 = conv2d ({input = "in", stride = 1, padding = 2}),
l2 = relu ({input = "l1"}),
l3 = maxPool2d ({input = "l2", stride = 2}),
l4 = conv2d ({input = "l3", stride = 1, padding = 2}),
l5 = relu ({input = "l4"}),
l6 = maxPool2d ({input = "l5", stride = 2}),
l7 = reshape ({input = "l6", shape = {-1, 1}}),
l8 = fullyConnected ({input = "l7"}),
l9 = relu ({input = "l8"}),
l10 = fullyConnected ({input = "l9"}),
out = softmax ({input = "l10"})
}

ccCodeTranslator(network, {file = "_lenet.c"})
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ util_log.o util_vec.o util_image.o global_fn_cfg.o
CATCOON_A = libcatcoon.a

APPS_DEMO = simple lenet lenet_pack lenet_unpack
APPS_UTIL = lspkg mkpkg
APPS_UTIL = lspkg mkpkg cclua

APP_NAMES = $(APPS_DEMO) $(APPS_UTIL)
APP_INC += $(INC)
Expand Down
Loading

0 comments on commit d02985b

Please sign in to comment.