[caffe] 01/01: d/tests: caffe_simple_run
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Wed May 18 09:37:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
cdluminate-guest pushed a commit to branch master
in repository caffe.
commit c828254e199bf2e560c373dc81b5d6a969970266
Author: Zhou Mo <cdluminate at gmail.com>
Date: Wed May 18 09:37:30 2016 +0000
d/tests: caffe_simple_run
---
debian/tests/caffe_simple_run | 70 +++++++++++++++++++++++++++++++++++++++++++
debian/tests/control | 1 +
2 files changed, 71 insertions(+)
diff --git a/debian/tests/caffe_simple_run b/debian/tests/caffe_simple_run
new file mode 100755
index 0000000..c1cacd8
--- /dev/null
+++ b/debian/tests/caffe_simple_run
@@ -0,0 +1,70 @@
+#!/bin/sh
+set -e
+
+# create a casual convolutional neural network, deploy version
+tmpfile=$(mktemp)
+cat > $tmpfile << EOF
+name: "Debian_Caffe_Test"
+input: "data"
+input_shape {
+ dim: 64
+ dim: 1
+ dim: 28
+ dim: 28
+}
+layer {
+ name: "conv1"
+ type: "Convolution"
+ bottom: "data"
+ top: "conv1"
+ convolution_param {
+ num_output: 5
+ kernel_size: 3
+ stride: 1
+ }
+}
+layer {
+ name: "pool1"
+ type: "Pooling"
+ bottom: "conv1"
+ top: "pool1"
+ pooling_param {
+ pool: MAX
+ kernel_size: 2
+ stride: 2
+ }
+}
+layer {
+ name: "ip1"
+ type: "InnerProduct"
+ bottom: "pool1"
+ top: "ip1"
+ inner_product_param {
+ num_output: 100
+ }
+}
+layer {
+ name: "relu1"
+ type: "ReLU"
+ bottom: "ip1"
+ top: "ip1"
+}
+layer {
+ name: "ip2"
+ type: "InnerProduct"
+ bottom: "ip1"
+ top: "ip2"
+ inner_product_param {
+ num_output: 10
+ }
+}
+layer {
+ name: "prob"
+ type: "Softmax"
+ bottom: "ip2"
+ top: "prob"
+}
+EOF
+
+# launch a caffe benchmark on the above network
+caffe time -model $tmpfile -iterations 50
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..6d2c070
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1 @@
+Tests: caffe_simple_run
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/caffe.git
More information about the debian-science-commits
mailing list