Merge PR #164
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/1b4f74b2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/1b4f74b2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/1b4f74b2 Branch: refs/heads/dev Commit: 1b4f74b2d90a2670570cd8ea79d56cb256c2909c Parents: b06db0b 272100a Author: Wei Wang <[email protected]> Authored: Mon Jun 13 20:19:12 2016 +0800 Committer: Wei Wang <[email protected]> Committed: Mon Jun 13 20:19:12 2016 +0800 ---------------------------------------------------------------------- CMakeLists.txt | 4 +- include/singa/core/tensor.h | 35 ++++--- include/singa/model/loss.h | 47 +++++++++ include/singa/utils/channel.h | 85 ++++++++++++++++ src/CMakeLists.txt | 1 + src/core/tensor/math_kernel.cu | 32 ++++++ src/core/tensor/math_kernel.h | 7 ++ src/core/tensor/tensor.cc | 50 ++++++++-- src/core/tensor/tensor_math.h | 21 ++++ src/core/tensor/tensor_math_cpp.h | 35 +++++++ src/core/tensor/tensor_math_cuda.h | 22 ++++ src/model/layer/flatten.cc | 55 ++++++++++ src/model/layer/flatten.h | 53 ++++++++++ src/model/layer/prelu.cc | 139 ++++++++++++++++++++++++++ src/model/layer/prelu.h | 59 +++++++++++ src/model/layer/softmax.cc | 7 +- src/model/loss/mse.cc | 41 ++++++++ src/model/loss/mse.h | 66 ------------ src/model/loss/softmax_cross_entropy.cc | 53 ++++++++++ src/proto/model.proto | 2 + src/utils/channel.cc | 104 +++++++++++++++++++ test/singa/test_channel.cc | 39 ++++++++ test/singa/test_cross_entropy.cc | 116 +++++++++++++++++++++ test/singa/test_flatten.cc | 144 +++++++++++++++++++++++++++ test/singa/test_mse.cc | 3 +- test/singa/test_prelu.cc | 137 +++++++++++++++++++++++++ test/singa/test_softmax.cc | 13 +-- test/singa/test_tensor_math.cc | 6 +- 28 files changed, 1270 insertions(+), 106 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/1b4f74b2/include/singa/core/tensor.h ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/1b4f74b2/src/proto/model.proto ----------------------------------------------------------------------
