def _config(self): layer_factory = LayerFactory(self) layer_factory.new_feed(name='data', layer_shape=(None, 48, 48, 3)) layer_factory.new_conv(name='conv1', kernel_size=(3, 3), channels_output=32, stride_size=(1, 1), padding='VALID', relu=False) layer_factory.new_prelu(name='prelu1') layer_factory.new_max_pool(name='pool1', kernel_size=(3, 3), stride_size=(2, 2)) layer_factory.new_conv(name='conv2', kernel_size=(3, 3), channels_output=64, stride_size=(1, 1), padding='VALID', relu=False) layer_factory.new_prelu(name='prelu2') layer_factory.new_max_pool(name='pool2', kernel_size=(3, 3), stride_size=(2, 2), padding='VALID') layer_factory.new_conv(name='conv3', kernel_size=(3, 3), channels_output=64, stride_size=(1, 1), padding='VALID', relu=False) layer_factory.new_prelu(name='prelu3') layer_factory.new_max_pool(name='pool3', kernel_size=(2, 2), stride_size=(2, 2)) layer_factory.new_conv(name='conv4', kernel_size=(2, 2), channels_output=128, stride_size=(1, 1), padding='VALID', relu=False) layer_factory.new_prelu(name='prelu4') layer_factory.new_fully_connected(name='fc1', output_count=256, relu=False) layer_factory.new_prelu(name='prelu5') layer_factory.new_fully_connected(name='fc2-1', output_count=2, relu=False) layer_factory.new_softmax(name='prob1', axis=1) layer_factory.new_fully_connected(name='fc2-2', output_count=4, relu=False, input_layer_name='prelu5') layer_factory.new_fully_connected(name='fc2-3', output_count=10, relu=False, input_layer_name='prelu5')
def _config(self): layer_factory = LayerFactory(self) layer_factory.new_feed(name='data', layer_shape=(None, None, None, 3)) layer_factory.new_conv(name='conv1', kernel_size=(3, 3), channels_output=10, stride_size=(1, 1), padding='VALID', relu=False) layer_factory.new_prelu(name='prelu1') layer_factory.new_max_pool(name='pool1', kernel_size=(2, 2), stride_size=(2, 2)) layer_factory.new_conv(name='conv2', kernel_size=(3, 3), channels_output=16, stride_size=(1, 1), padding='VALID', relu=False) layer_factory.new_prelu(name='prelu2') layer_factory.new_conv(name='conv3', kernel_size=(3, 3), channels_output=32, stride_size=(1, 1), padding='VALID', relu=False) layer_factory.new_prelu(name='prelu3') layer_factory.new_conv(name='conv4-1', kernel_size=(1, 1), channels_output=2, stride_size=(1, 1), relu=False) layer_factory.new_softmax(name='prob1', axis=3) layer_factory.new_conv(name='conv4-2', kernel_size=(1, 1), channels_output=4, stride_size=(1, 1), input_layer_name='prelu3', relu=False)