You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2017/01/24 12:21:22 UTC
incubator-singa git commit: preparing v1.1-rc1: remove prototxt files;
fix license issues; update package version to 1.1.0
Repository: incubator-singa
Updated Branches:
refs/heads/master 3a3563568 -> 43497bcab
preparing v1.1-rc1: remove prototxt files; fix license issues; update package version to 1.1.0
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/43497bca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/43497bca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/43497bca
Branch: refs/heads/master
Commit: 43497bcab3628a96d7e345e31c6baf8f06ee137c
Parents: 3a35635
Author: Wei Wang <wa...@comp.nus.edu.sg>
Authored: Tue Jan 24 19:59:12 2017 +0800
Committer: Wei Wang <wa...@comp.nus.edu.sg>
Committed: Tue Jan 24 20:17:48 2017 +0800
----------------------------------------------------------------------
.travis.yml | 18 ++
CMakeLists.txt | 2 +-
LICENSE | 30 +++
examples/cifar10/caffe/__init__.py | 18 ++
examples/cifar10/caffe/caffe_net.py | 11 +-
.../cifar10/caffe/cifar10_full_solver.prototxt | 30 ---
.../caffe/cifar10_full_train_test.prototxt | 223 ------------------
.../cifar10/caffe/cifar10_quick_solver.prototxt | 29 ---
.../caffe/cifar10_quick_train_test.prototxt | 225 -------------------
python/singa/__init__.py | 1 -
10 files changed, 73 insertions(+), 514 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index d9bba51..9ff11f0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
sudo: required
language: cpp
compiler: gcc
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23545b3..61c708d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(singa)
-SET(PACKAGE_VERSION "1.0.1")
+SET(PACKAGE_VERSION "1.1.0")
SET(SINGA_MAJOR_VERSION 1) # 0 -
SET(SINGA_MINOR_VERSION 1) # 0 - 9
SET(SINGA_PATCH_VERSION 0) # 0 - 99
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 329bb7e..682abfd 100644
--- a/LICENSE
+++ b/LICENSE
@@ -292,6 +292,36 @@ or otherwise, the contributor releases their content to the
license and copyright terms herein.
+
+=====================================================================
+SINGA bundles the following under MIT license:
+cmake/ThirdParty/FindOpenCL.cmake
+
+Copyright (c) 2010-2016 Institute for Microelectronics,
+ Institute for Analysis and Scientific Computing, TU Wien.
+Portions of this software are copyright by UChicago Argonne, LLC.
+Argonne National Laboratory, with facilities in the state of Illinois,
+is owned by The United States Government, and operated by UChicago Argonne, LLC
+under provision of a contract with the Department of Energy.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
=====================================================================
SINGA bundles the following under New BSD license: test/gtest/*
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/examples/cifar10/caffe/__init__.py
----------------------------------------------------------------------
diff --git a/examples/cifar10/caffe/__init__.py b/examples/cifar10/caffe/__init__.py
index e69de29..ffd1754 100644
--- a/examples/cifar10/caffe/__init__.py
+++ b/examples/cifar10/caffe/__init__.py
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/examples/cifar10/caffe/caffe_net.py
----------------------------------------------------------------------
diff --git a/examples/cifar10/caffe/caffe_net.py b/examples/cifar10/caffe/caffe_net.py
index a32a356..2db131a 100644
--- a/examples/cifar10/caffe/caffe_net.py
+++ b/examples/cifar10/caffe/caffe_net.py
@@ -14,16 +14,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================
-
-import os
+import urllib
from singa import converter
+
def create_net(use_cpu):
- net_proto = os.path.abspath('./caffe/cifar10_full_train_test.prototxt')
- solver_proto = os.path.abspath('./caffe/cifar10_full_solver.prototxt')
+ urllib.urlretrieve("https://raw.githubusercontent.com/BVLC/caffe/master/examples/cifar10/cifar10_full_train_test.prototxt", "train_test.prototxt")
+ urllib.urlretrieve("https://raw.githubusercontent.com/BVLC/caffe/master/examples/cifar10/cifar10_full_solver.prototxt", "solver.prototxt")
input_sample_shape = [3, 32, 32, ]
- cvt = converter.CaffeConverter(net_proto, solver_proto, input_sample_shape)
+ cvt = converter.CaffeConverter("train_test.prototxt", "solver.prototxt",
+ input_sample_shape)
net = cvt.create_net()
for (p, specs) in zip(net.param_values(), net.param_specs()):
filler = specs.filler
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/examples/cifar10/caffe/cifar10_full_solver.prototxt
----------------------------------------------------------------------
diff --git a/examples/cifar10/caffe/cifar10_full_solver.prototxt b/examples/cifar10/caffe/cifar10_full_solver.prototxt
deleted file mode 100644
index 1e708d8..0000000
--- a/examples/cifar10/caffe/cifar10_full_solver.prototxt
+++ /dev/null
@@ -1,30 +0,0 @@
-# From caffe repository
-# Commits on Sep 2, 2015
-
-# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10
-# then another factor of 10 after 10 more epochs (5000 iters)
-
-# The train/test net protocol buffer definition
-net: "examples/cifar10/cifar10_full_train_test.prototxt"
-# test_iter specifies how many forward passes the test should carry out.
-# In the case of CIFAR10, we have test batch size 100 and 100 test iterations,
-# covering the full 10,000 testing images.
-test_iter: 100
-# Carry out testing every 1000 training iterations.
-test_interval: 1000
-# The base learning rate, momentum and the weight decay of the network.
-base_lr: 0.001
-momentum: 0.9
-weight_decay: 0.004
-# The learning rate policy
-lr_policy: "fixed"
-# Display every 200 iterations
-display: 200
-# The maximum number of iterations
-max_iter: 60000
-# snapshot intermediate results
-snapshot: 10000
-snapshot_format: HDF5
-snapshot_prefix: "examples/cifar10/cifar10_full"
-# solver mode: CPU or GPU
-solver_mode: GPU
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/examples/cifar10/caffe/cifar10_full_train_test.prototxt
----------------------------------------------------------------------
diff --git a/examples/cifar10/caffe/cifar10_full_train_test.prototxt b/examples/cifar10/caffe/cifar10_full_train_test.prototxt
deleted file mode 100644
index 40b39ec..0000000
--- a/examples/cifar10/caffe/cifar10_full_train_test.prototxt
+++ /dev/null
@@ -1,223 +0,0 @@
-# From caffe repository
-# Commits on Feb 6, 2015
-
-name: "CIFAR10_full"
-layer {
- name: "cifar"
- type: "Data"
- top: "data"
- top: "label"
- include {
- phase: TRAIN
- }
- transform_param {
- mean_file: "examples/cifar10/mean.binaryproto"
- }
- data_param {
- source: "examples/cifar10/cifar10_train_lmdb"
- batch_size: 100
- backend: LMDB
- }
-}
-layer {
- name: "cifar"
- type: "Data"
- top: "data"
- top: "label"
- include {
- phase: TEST
- }
- transform_param {
- mean_file: "examples/cifar10/mean.binaryproto"
- }
- data_param {
- source: "examples/cifar10/cifar10_test_lmdb"
- batch_size: 100
- backend: LMDB
- }
-}
-layer {
- name: "conv1"
- type: "Convolution"
- bottom: "data"
- top: "conv1"
- param {
- lr_mult: 1
- }
- param {
- lr_mult: 2
- }
- convolution_param {
- num_output: 32
- pad: 2
- kernel_size: 5
- stride: 1
- weight_filler {
- type: "gaussian"
- std: 0.0001
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "pool1"
- type: "Pooling"
- bottom: "conv1"
- top: "pool1"
- pooling_param {
- pool: MAX
- kernel_size: 3
- stride: 2
- }
-}
-layer {
- name: "relu1"
- type: "ReLU"
- bottom: "pool1"
- top: "pool1"
-}
-layer {
- name: "norm1"
- type: "LRN"
- bottom: "pool1"
- top: "norm1"
- lrn_param {
- local_size: 3
- alpha: 5e-05
- beta: 0.75
- norm_region: WITHIN_CHANNEL
- }
-}
-layer {
- name: "conv2"
- type: "Convolution"
- bottom: "norm1"
- top: "conv2"
- param {
- lr_mult: 1
- }
- param {
- lr_mult: 2
- }
- convolution_param {
- num_output: 32
- pad: 2
- kernel_size: 5
- stride: 1
- weight_filler {
- type: "gaussian"
- std: 0.01
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "relu2"
- type: "ReLU"
- bottom: "conv2"
- top: "conv2"
-}
-layer {
- name: "pool2"
- type: "Pooling"
- bottom: "conv2"
- top: "pool2"
- pooling_param {
- pool: AVE
- kernel_size: 3
- stride: 2
- }
-}
-layer {
- name: "norm2"
- type: "LRN"
- bottom: "pool2"
- top: "norm2"
- lrn_param {
- local_size: 3
- alpha: 5e-05
- beta: 0.75
- norm_region: WITHIN_CHANNEL
- }
-}
-layer {
- name: "conv3"
- type: "Convolution"
- bottom: "norm2"
- top: "conv3"
- convolution_param {
- num_output: 64
- pad: 2
- kernel_size: 5
- stride: 1
- weight_filler {
- type: "gaussian"
- std: 0.01
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "relu3"
- type: "ReLU"
- bottom: "conv3"
- top: "conv3"
-}
-layer {
- name: "pool3"
- type: "Pooling"
- bottom: "conv3"
- top: "pool3"
- pooling_param {
- pool: AVE
- kernel_size: 3
- stride: 2
- }
-}
-layer {
- name: "ip1"
- type: "InnerProduct"
- bottom: "pool3"
- top: "ip1"
- param {
- lr_mult: 1
- decay_mult: 250
- }
- param {
- lr_mult: 2
- decay_mult: 0
- }
- inner_product_param {
- num_output: 10
- weight_filler {
- type: "gaussian"
- std: 0.01
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "accuracy"
- type: "Accuracy"
- bottom: "ip1"
- bottom: "label"
- top: "accuracy"
- include {
- phase: TEST
- }
-}
-layer {
- name: "loss"
- type: "SoftmaxWithLoss"
- bottom: "ip1"
- bottom: "label"
- top: "loss"
-}
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/examples/cifar10/caffe/cifar10_quick_solver.prototxt
----------------------------------------------------------------------
diff --git a/examples/cifar10/caffe/cifar10_quick_solver.prototxt b/examples/cifar10/caffe/cifar10_quick_solver.prototxt
deleted file mode 100644
index 3c5ce96..0000000
--- a/examples/cifar10/caffe/cifar10_quick_solver.prototxt
+++ /dev/null
@@ -1,29 +0,0 @@
-# From caffe repository
-# Commits on Sep 2, 2015
-
-# reduce the learning rate after 8 epochs (4000 iters) by a factor of 10
-
-# The train/test net protocol buffer definition
-net: "examples/cifar10/cifar10_quick_train_test.prototxt"
-# test_iter specifies how many forward passes the test should carry out.
-# In the case of MNIST, we have test batch size 100 and 100 test iterations,
-# covering the full 10,000 testing images.
-test_iter: 100
-# Carry out testing every 500 training iterations.
-test_interval: 500
-# The base learning rate, momentum and the weight decay of the network.
-base_lr: 0.001
-momentum: 0.9
-weight_decay: 0.004
-# The learning rate policy
-lr_policy: "fixed"
-# Display every 100 iterations
-display: 100
-# The maximum number of iterations
-max_iter: 4000
-# snapshot intermediate results
-snapshot: 4000
-snapshot_format: HDF5
-snapshot_prefix: "examples/cifar10/cifar10_quick"
-# solver mode: CPU or GPU
-solver_mode: GPU
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/examples/cifar10/caffe/cifar10_quick_train_test.prototxt
----------------------------------------------------------------------
diff --git a/examples/cifar10/caffe/cifar10_quick_train_test.prototxt b/examples/cifar10/caffe/cifar10_quick_train_test.prototxt
deleted file mode 100644
index f83ca4b..0000000
--- a/examples/cifar10/caffe/cifar10_quick_train_test.prototxt
+++ /dev/null
@@ -1,225 +0,0 @@
-# From caffe repository
-# Commits on Feb 6, 2015
-
-name: "CIFAR10_quick"
-layer {
- name: "cifar"
- type: "Data"
- top: "data"
- top: "label"
- include {
- phase: TRAIN
- }
- transform_param {
- mean_file: "examples/cifar10/mean.binaryproto"
- }
- data_param {
- source: "examples/cifar10/cifar10_train_lmdb"
- batch_size: 100
- backend: LMDB
- }
-}
-layer {
- name: "cifar"
- type: "Data"
- top: "data"
- top: "label"
- include {
- phase: TEST
- }
- transform_param {
- mean_file: "examples/cifar10/mean.binaryproto"
- }
- data_param {
- source: "examples/cifar10/cifar10_test_lmdb"
- batch_size: 100
- backend: LMDB
- }
-}
-layer {
- name: "conv1"
- type: "Convolution"
- bottom: "data"
- top: "conv1"
- param {
- lr_mult: 1
- }
- param {
- lr_mult: 2
- }
- convolution_param {
- num_output: 32
- pad: 2
- kernel_size: 5
- stride: 1
- weight_filler {
- type: "gaussian"
- std: 0.0001
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "pool1"
- type: "Pooling"
- bottom: "conv1"
- top: "pool1"
- pooling_param {
- pool: MAX
- kernel_size: 3
- stride: 2
- }
-}
-layer {
- name: "relu1"
- type: "ReLU"
- bottom: "pool1"
- top: "pool1"
-}
-layer {
- name: "conv2"
- type: "Convolution"
- bottom: "pool1"
- top: "conv2"
- param {
- lr_mult: 1
- }
- param {
- lr_mult: 2
- }
- convolution_param {
- num_output: 32
- pad: 2
- kernel_size: 5
- stride: 1
- weight_filler {
- type: "gaussian"
- std: 0.01
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "relu2"
- type: "ReLU"
- bottom: "conv2"
- top: "conv2"
-}
-layer {
- name: "pool2"
- type: "Pooling"
- bottom: "conv2"
- top: "pool2"
- pooling_param {
- pool: AVE
- kernel_size: 3
- stride: 2
- }
-}
-layer {
- name: "conv3"
- type: "Convolution"
- bottom: "pool2"
- top: "conv3"
- param {
- lr_mult: 1
- }
- param {
- lr_mult: 2
- }
- convolution_param {
- num_output: 64
- pad: 2
- kernel_size: 5
- stride: 1
- weight_filler {
- type: "gaussian"
- std: 0.01
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "relu3"
- type: "ReLU"
- bottom: "conv3"
- top: "conv3"
-}
-layer {
- name: "pool3"
- type: "Pooling"
- bottom: "conv3"
- top: "pool3"
- pooling_param {
- pool: AVE
- kernel_size: 3
- stride: 2
- }
-}
-layer {
- name: "ip1"
- type: "InnerProduct"
- bottom: "pool3"
- top: "ip1"
- param {
- lr_mult: 1
- }
- param {
- lr_mult: 2
- }
- inner_product_param {
- num_output: 64
- weight_filler {
- type: "gaussian"
- std: 0.1
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "ip2"
- type: "InnerProduct"
- bottom: "ip1"
- top: "ip2"
- param {
- lr_mult: 1
- }
- param {
- lr_mult: 2
- }
- inner_product_param {
- num_output: 10
- weight_filler {
- type: "gaussian"
- std: 0.1
- }
- bias_filler {
- type: "constant"
- }
- }
-}
-layer {
- name: "accuracy"
- type: "Accuracy"
- bottom: "ip2"
- bottom: "label"
- top: "accuracy"
- include {
- phase: TEST
- }
-}
-layer {
- name: "loss"
- type: "SoftmaxWithLoss"
- bottom: "ip2"
- bottom: "label"
- top: "loss"
-}
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/43497bca/python/singa/__init__.py
----------------------------------------------------------------------
diff --git a/python/singa/__init__.py b/python/singa/__init__.py
index 3f24896..039d356 100644
--- a/python/singa/__init__.py
+++ b/python/singa/__init__.py
@@ -1,4 +1,3 @@
-#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information