[caffe-contrib] 01/03: tests: update autopkgtest scripts

Zhou Mo cdluminate-guest at moszumanska.debian.org
Fri Dec 9 02:21:24 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-contrib.

commit 42d93a485d2f0c8a4e74f975983d75478e214177
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Fri Dec 9 02:11:08 2016 +0000

    tests: update autopkgtest scripts
---
 debian/changelog                   |  7 +++++++
 debian/tests/python-caffe-test.py  | 43 --------------------------------------
 debian/tests/python3caffetestsuite |  2 --
 debian/tests/simple                |  9 --------
 debian/tests/simply.run            |  2 +-
 5 files changed, 8 insertions(+), 55 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 80db65f..f9de8d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+caffe-contrib (1.0.0~rc3+20161127-g24d2f67-3) UNRELEASED; urgency=medium
+
+  * Avoid autopkgtest failure by fixing stderr redirection.
+  * Remove deprecated autopkgtest scripts.
+
+ -- Zhou Mo <cdluminate at gmail.com>  Fri, 09 Dec 2016 02:10:10 +0000
+
 caffe-contrib (1.0.0~rc3+20161127-g24d2f67-2) unstable; urgency=medium
 
   * Refresh symbols control file for amd64.
diff --git a/debian/tests/python-caffe-test.py b/debian/tests/python-caffe-test.py
deleted file mode 100644
index df2c883..0000000
--- a/debian/tests/python-caffe-test.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-'''
-Caffe Python Module Testsuite for Debian Package
-Copyright (C) 2016 Zhou Mo
-
-Reference:
-http://nbviewer.jupyter.org/github/BVLC/caffe/blob/master/examples/01-learning-lenet.ipynb
-http://nbviewer.jupyter.org/github/BVLC/caffe/blob/master/examples/net_surgery.ipynb
-'''
-
-import numpy
-import caffe
-
-def test_lenet_benchmark():
-  # load lenet deploy network
-  model_definition = "examples/mnist/lenet.prototxt"
-  caffe.set_mode_cpu()
-  model = caffe.Net(model_definition, caffe.TEST)
-  # populate random data and copy it to network
-  batch = numpy.random.randn(64, 1, 28, 28)
-  model.blobs['data'].reshape(64, 1, 28, 28)
-  model.blobs['data'].data[...] = batch
-  # randomly fill parameter into network
-  model.params['conv1'][0].data.shape # access test, this should be (20, 1, 5, 5)
-  model.params['conv1'][0].flat = numpy.random.randn(20, 1, 5, 5).flat
-  model.params['conv1'][1].flat = numpy.random.randn(20,).flat
-  model.params['conv2'][0].flat = numpy.random.randn(50, 20, 5, 5).flat
-  model.params['conv2'][1].flat = numpy.random.randn(50,).flat
-  model.params['ip1'][0].flat = numpy.random.randn(500, 800).flat
-  model.params['ip1'][1].flat = numpy.random.randn(500,).flat
-  model.params['ip2'][0].flat = numpy.random.randn(10, 500).flat
-  model.params['ip2'][1].flat = numpy.random.randn(10,).flat
-  # forward this network, here we don't care neither the network parameters nor the result.
-  output = model.forward()
-  output_prob = output['prob'][0] # prob vector for the first image in batch
-  prediction = output_prob.argmax()
-  print ('This mindless benchmark ends up with an arbitary output {}'.format(prediction))
-
-def main():
-  test_lenet_benchmark()
-
-if __name__ == "__main__":
-  main()
diff --git a/debian/tests/python3caffetestsuite b/debian/tests/python3caffetestsuite
deleted file mode 100755
index 35a1865..0000000
--- a/debian/tests/python3caffetestsuite
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-python3 python-caffe-test.py
diff --git a/debian/tests/simple b/debian/tests/simple
deleted file mode 100755
index b5824f8..0000000
--- a/debian/tests/simple
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-set -e
-
-# using the deploy version of lenet for a benchmark test, which requires
-# no MNIST dataset.
-model=examples/mnist/lenet.prototxt
-
-# launch a caffe benchmark on the above network
-caffe time -model $model -iterations 50
diff --git a/debian/tests/simply.run b/debian/tests/simply.run
index be92ce8..f20ae04 100755
--- a/debian/tests/simply.run
+++ b/debian/tests/simply.run
@@ -2,6 +2,6 @@
 set -e
 
 # simply run caffe to see if it explodes.
-caffe -logtostderr false
+caffe 2>&1
 
 exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/caffe-contrib.git



More information about the debian-science-commits mailing list