#* #* 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. #* #*************************************************************/ import sys, os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from singa.model import * from examples.datasets import cifar10 X_train, X_test, workspace = cifar10.load_data() m = Sequential('cifar10-cnn', sys.argv) m.add(Convolution2D(32, 5, 1, 2, w_std=0.0001, b_lr=2)) m.add(MaxPooling2D(pool_size=(3, 3), stride=2)) m.add(Activation('relu')) m.add(LRN2D(3, alpha=0.00005, beta=0.75)) m.add(Convolution2D(32, 5, 1, 2, b_lr=2)) m.add(Activation('relu')) m.add(AvgPooling2D(pool_size=(3, 3), stride=2)) m.add(LRN2D(3, alpha=0.00005, beta=0.75)) m.add(Convolution2D(64, 5, 1, 2)) m.add(Activation('relu'))
#* 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. #* #*************************************************************/ import sys, os sys.path.append(os.path.join(os.path.dirname(__file__),'..')) from singa.model import * from examples.datasets import cifar10 X_train, X_test, workspace = cifar10.load_data() m = Sequential('cifar10-cnn', sys.argv) m.add(Convolution2D(32, 5, 1, 2, w_std=0.0001, b_lr=2)) m.add(MaxPooling2D(pool_size=(3,3), stride=2)) m.add(Activation('relu')) m.add(LRN2D(3, alpha=0.00005, beta=0.75)) m.add(Convolution2D(32, 5, 1, 2, b_lr=2)) m.add(Activation('relu')) m.add(AvgPooling2D(pool_size=(3,3), stride=2)) m.add(LRN2D(3, alpha=0.00005, beta=0.75)) m.add(Convolution2D(64, 5, 1, 2)) m.add(Activation('relu'))