cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
322 stars 92 forks source link

[TUTORIAL] Lenet sample added #14

Closed Huyuwei closed 6 years ago

Huyuwei commented 6 years ago

We use a lenet model trained on MNIST from mxnet and run it with heterocl. The test accuracy is 98.83%.

Huyuwei commented 6 years ago

changes in api.py and build_module.py should be checked before merge

Huyuwei commented 6 years ago

@seanlatias Now something is wrong with pad operator, to reproduce the error and debug, just set the padding to be none zero this way:

conv1 = conv2d_nchw(input_image, weight_conv1, padding=[[2,2],[2,2]])

https://github.com/Huyuwei/heterocl/blob/ace2b1039b29015243b1907c2e4be52fad73843e/heterocl/samples/lenet.py#L156