forked from apache/mxnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
298 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
"""References: | ||
Szegedy, Christian, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir | ||
Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. "Going deeper | ||
with convolutions." arXiv preprint arXiv:1409.4842 (2014). | ||
""" | ||
|
||
import find_mxnet | ||
import mxnet as mx | ||
|
||
def ConvFactory(data, num_filter, kernel, stride=(1,1), pad=(0, 0), name=None, suffix=''): | ||
conv = mx.symbol.Convolution(data=data, num_filter=num_filter, kernel=kernel, stride=stride, pad=pad, name='conv_%s%s' %(name, suffix)) | ||
act = mx.symbol.Activation(data=conv, act_type='relu', name='relu_%s%s' %(name, suffix)) | ||
return act | ||
|
||
def InceptionFactory(data, num_1x1, num_3x3red, num_3x3, num_d5x5red, num_d5x5, pool, proj, name): | ||
# 1x1 | ||
c1x1 = ConvFactory(data=data, num_filter=num_1x1, kernel=(1, 1), name=('%s_1x1' % name)) | ||
# 3x3 reduce + 3x3 | ||
c3x3r = ConvFactory(data=data, num_filter=num_3x3red, kernel=(1, 1), name=('%s_3x3' % name), suffix='_reduce') | ||
c3x3 = ConvFactory(data=c3x3r, num_filter=num_3x3, kernel=(3, 3), pad=(1, 1), name=('%s_3x3' % name)) | ||
# double 3x3 reduce + double 3x3 | ||
cd5x5r = ConvFactory(data=data, num_filter=num_d5x5red, kernel=(1, 1), name=('%s_double_3x3' % name), suffix='_reduce') | ||
cd5x5 = ConvFactory(data=cd5x5r, num_filter=num_d5x5, kernel=(3, 3), pad=(1, 1), name=('%s_double_3x3_1' % name)) | ||
# pool + proj | ||
pooling = mx.symbol.Pooling(data=data, kernel=(3, 3), stride=(1, 1), pad=(1, 1), pool_type=pool, name=('%s_pool_%s_pool' % (pool, name))) | ||
cproj = ConvFactory(data=pooling, num_filter=proj, kernel=(1, 1), name=('%s_proj' % name)) | ||
# concat | ||
concat = mx.symbol.Concat(*[c1x1, c3x3, cd5x5, cproj], name='ch_concat_%s_chconcat' % name) | ||
return concat | ||
|
||
def get_symbol(num_classes = 1000): | ||
data = mx.sym.Variable("data") | ||
conv1 = ConvFactory(data, 64, kernel=(7, 7), stride=(2,2), pad=(3, 3)) | ||
pool1 = mx.sym.Pooling(conv1, kernel=(3, 3), stride=(2, 2), pool_type="max") | ||
conv2 = ConvFactory(pool1, 64, kernel=(1, 1), stride=(1,1)) | ||
conv3 = ConvFactory(conv2, 192, kernel=(3, 3), stride=(1, 1), pad=(1,1)) | ||
pool3 = mx.sym.Pooling(conv3, kernel=(3, 3), stride=(2, 2), pool_type="max") | ||
|
||
in3a = InceptionFactory(pool3, 64, 96, 128, 16, 32, "max", 32, name="in3a") | ||
in3b = InceptionFactory(in3a, 128, 128, 192, 32, 96, "max", 64, name="in3b") | ||
pool4 = mx.sym.Pooling(in3b, kernel=(3, 3), stride=(2, 2), pool_type="max") | ||
in4a = InceptionFactory(pool4, 192, 96, 208, 16, 48, "max", 64, name="in4a") | ||
in4b = InceptionFactory(in4a, 160, 112, 224, 24, 64, "max", 64, name="in4b") | ||
in4c = InceptionFactory(in4b, 128, 128, 256, 24, 64, "max", 64, name="in4c") | ||
in4d = InceptionFactory(in4c, 112, 144, 288, 32, 64, "max", 64, name="in4d") | ||
in4e = InceptionFactory(in4d, 256, 160, 320, 32, 128, "max", 128, name="in4e") | ||
pool5 = mx.sym.Pooling(in4e, kernel=(3, 3), stride=(2, 2), pool_type="max") | ||
in5a = InceptionFactory(pool5, 256, 160, 320, 32, 128, "max", 128, name="in5a") | ||
in5b = InceptionFactory(in5a, 384, 192, 384, 48, 128, "max", 128, name="in5b") | ||
pool6 = mx.sym.Pooling(in5b, kernel=(7, 7), stride=(1,1), pool_type="avg") | ||
flatten = mx.sym.Flatten(data=pool6) | ||
fc1 = mx.sym.FullyConnected(data=flatten, num_hidden=num_classes) | ||
softmax = mx.symbol.SoftmaxOutput(data=fc1, name='softmax') | ||
return softmax |
3 changes: 2 additions & 1 deletion
3
...e/image-classification/inception_bn_28.py → ...e/image-classification/inception-bn-28.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
""" | ||
An variant of inception-bn.py for the full imagenet dataset with >= 21841 classes | ||
""" | ||
|
||
import find_mxnet | ||
import mxnet as mx | ||
|
||
def ConvFactory(data, num_filter, kernel, stride=(1,1), pad=(0, 0), name=None, suffix=''): | ||
conv = mx.symbol.Convolution(data=data, workspace=512, num_filter=num_filter, kernel=kernel, stride=stride, pad=pad, name='conv_%s%s' %(name, suffix)) | ||
bn = mx.symbol.BatchNorm(data=conv, name='bn_%s%s' %(name, suffix)) | ||
act = mx.symbol.Activation(data=bn, act_type='relu', name='relu_%s%s' %(name, suffix)) | ||
return act | ||
|
||
def InceptionFactoryA(data, num_1x1, num_3x3red, num_3x3, num_d3x3red, num_d3x3, pool, proj, name): | ||
# 1x1 | ||
c1x1 = ConvFactory(data=data, num_filter=num_1x1, kernel=(1, 1), name=('%s_1x1' % name)) | ||
# 3x3 reduce + 3x3 | ||
c3x3r = ConvFactory(data=data, num_filter=num_3x3red, kernel=(1, 1), name=('%s_3x3' % name), suffix='_reduce') | ||
c3x3 = ConvFactory(data=c3x3r, num_filter=num_3x3, kernel=(3, 3), pad=(1, 1), name=('%s_3x3' % name)) | ||
# double 3x3 reduce + double 3x3 | ||
cd3x3r = ConvFactory(data=data, num_filter=num_d3x3red, kernel=(1, 1), name=('%s_double_3x3' % name), suffix='_reduce') | ||
cd3x3 = ConvFactory(data=cd3x3r, num_filter=num_d3x3, kernel=(3, 3), pad=(1, 1), name=('%s_double_3x3_0' % name)) | ||
cd3x3 = ConvFactory(data=cd3x3, num_filter=num_d3x3, kernel=(3, 3), pad=(1, 1), name=('%s_double_3x3_1' % name)) | ||
# pool + proj | ||
pooling = mx.symbol.Pooling(data=data, kernel=(3, 3), stride=(1, 1), pad=(1, 1), pool_type=pool, name=('%s_pool_%s_pool' % (pool, name))) | ||
cproj = ConvFactory(data=pooling, num_filter=proj, kernel=(1, 1), name=('%s_proj' % name)) | ||
# concat | ||
concat = mx.symbol.Concat(*[c1x1, c3x3, cd3x3, cproj], name='ch_concat_%s_chconcat' % name) | ||
return concat | ||
|
||
def InceptionFactoryB(data, num_3x3red, num_3x3, num_d3x3red, num_d3x3, name): | ||
# 3x3 reduce + 3x3 | ||
c3x3r = ConvFactory(data=data, num_filter=num_3x3red, kernel=(1, 1), name=('%s_3x3' % name), suffix='_reduce') | ||
c3x3 = ConvFactory(data=c3x3r, num_filter=num_3x3, kernel=(3, 3), pad=(1, 1), stride=(2, 2), name=('%s_3x3' % name)) | ||
# double 3x3 reduce + double 3x3 | ||
cd3x3r = ConvFactory(data=data, num_filter=num_d3x3red, kernel=(1, 1), name=('%s_double_3x3' % name), suffix='_reduce') | ||
cd3x3 = ConvFactory(data=cd3x3r, num_filter=num_d3x3, kernel=(3, 3), pad=(1, 1), stride=(1, 1), name=('%s_double_3x3_0' % name)) | ||
cd3x3 = ConvFactory(data=cd3x3, num_filter=num_d3x3, kernel=(3, 3), pad=(1, 1), stride=(2, 2), name=('%s_double_3x3_1' % name)) | ||
# pool + proj | ||
pooling = mx.symbol.Pooling(data=data, kernel=(3, 3), stride=(2, 2), pool_type="max", name=('max_pool_%s_pool' % name)) | ||
# concat | ||
concat = mx.symbol.Concat(*[c3x3, cd3x3, pooling], name='ch_concat_%s_chconcat' % name) | ||
return concat | ||
|
||
def inception(num_classes = 21841): | ||
# data | ||
data = mx.symbol.Variable(name="data") | ||
# stage 1 | ||
conv1 = ConvFactory(data=data, num_filter=96, kernel=(7, 7), stride=(2, 2), pad=(3, 3), name='conv1') | ||
pool1 = mx.symbol.Pooling(data=conv1, kernel=(3, 3), stride=(2, 2), name='pool1', pool_type='max') | ||
# stage 2 | ||
conv2red = ConvFactory(data=pool1, num_filter=128, kernel=(1, 1), stride=(1, 1), name='conv2red') | ||
conv2 = ConvFactory(data=conv2red, num_filter=288, kernel=(3, 3), stride=(1, 1), pad=(1, 1), name='conv2') | ||
pool2 = mx.symbol.Pooling(data=conv2, kernel=(3, 3), stride=(2, 2), name='pool2', pool_type='max') | ||
# stage 2 | ||
in3a = InceptionFactoryA(pool2, 96, 96, 96, 96, 144, "avg", 48, '3a') | ||
in3b = InceptionFactoryA(in3a, 96, 96, 144, 96, 144, "avg", 96, '3b') | ||
in3c = InceptionFactoryB(in3b, 192, 240, 96, 144, '3c') | ||
# stage 3 | ||
in4a = InceptionFactoryA(in3c, 224, 64, 96, 96, 128, "avg", 128, '4a') | ||
in4b = InceptionFactoryA(in4a, 192, 96, 128, 96, 128, "avg", 128, '4b') | ||
in4c = InceptionFactoryA(in4b, 160, 128, 160, 128, 160, "avg", 128, '4c') | ||
in4d = InceptionFactoryA(in4c, 96, 128, 192, 160, 96, "avg", 128, '4d') | ||
in4e = InceptionFactoryB(in4d, 128, 192, 192, 256, '4e') | ||
# stage 4 | ||
in5a = InceptionFactoryA(in4e, 352, 192, 320, 160, 224, "avg", 128, '5a') | ||
in5b = InceptionFactoryA(in5a, 352, 192, 320, 192, 224, "max", 128, '5b') | ||
# global avg pooling | ||
avg = mx.symbol.Pooling(data=in5b, kernel=(7, 7), stride=(1, 1), name="global_pool", pool_type='avg') | ||
# linear classifier | ||
flatten = mx.symbol.Flatten(data=avg, name='flatten') | ||
fc1 = mx.symbol.FullyConnected(data=flatten, num_hidden=num_classes, name='fc1') | ||
softmax = mx.symbol.SoftmaxOutput(data=fc1, name='softmax') | ||
return softmax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
""" | ||
Inception + BN, suitable for images with around 224 x 224 | ||
Reference: | ||
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep | ||
network training by reducing internal covariate shift. arXiv preprint | ||
arXiv:1502.03167, 2015. | ||
""" | ||
|
||
import find_mxnet | ||
import mxnet as mx | ||
|
||
def ConvFactory(data, num_filter, kernel, stride=(1,1), pad=(0, 0), name=None, suffix=''): | ||
conv = mx.symbol.Convolution(data=data, num_filter=num_filter, kernel=kernel, stride=stride, pad=pad, name='conv_%s%s' %(name, suffix)) | ||
bn = mx.symbol.BatchNorm(data=conv, name='bn_%s%s' %(name, suffix)) | ||
act = mx.symbol.Activation(data=bn, act_type='relu', name='relu_%s%s' %(name, suffix)) | ||
return act | ||
|
||
def InceptionFactoryA(data, num_1x1, num_3x3red, num_3x3, num_d3x3red, num_d3x3, pool, proj, name): | ||
# 1x1 | ||
c1x1 = ConvFactory(data=data, num_filter=num_1x1, kernel=(1, 1), name=('%s_1x1' % name)) | ||
# 3x3 reduce + 3x3 | ||
c3x3r = ConvFactory(data=data, num_filter=num_3x3red, kernel=(1, 1), name=('%s_3x3' % name), suffix='_reduce') | ||
c3x3 = ConvFactory(data=c3x3r, num_filter=num_3x3, kernel=(3, 3), pad=(1, 1), name=('%s_3x3' % name)) | ||
# double 3x3 reduce + double 3x3 | ||
cd3x3r = ConvFactory(data=data, num_filter=num_d3x3red, kernel=(1, 1), name=('%s_double_3x3' % name), suffix='_reduce') | ||
cd3x3 = ConvFactory(data=cd3x3r, num_filter=num_d3x3, kernel=(3, 3), pad=(1, 1), name=('%s_double_3x3_0' % name)) | ||
cd3x3 = ConvFactory(data=cd3x3, num_filter=num_d3x3, kernel=(3, 3), pad=(1, 1), name=('%s_double_3x3_1' % name)) | ||
# pool + proj | ||
pooling = mx.symbol.Pooling(data=data, kernel=(3, 3), stride=(1, 1), pad=(1, 1), pool_type=pool, name=('%s_pool_%s_pool' % (pool, name))) | ||
cproj = ConvFactory(data=pooling, num_filter=proj, kernel=(1, 1), name=('%s_proj' % name)) | ||
# concat | ||
concat = mx.symbol.Concat(*[c1x1, c3x3, cd3x3, cproj], name='ch_concat_%s_chconcat' % name) | ||
return concat | ||
|
||
def InceptionFactoryB(data, num_3x3red, num_3x3, num_d3x3red, num_d3x3, name): | ||
# 3x3 reduce + 3x3 | ||
c3x3r = ConvFactory(data=data, num_filter=num_3x3red, kernel=(1, 1), name=('%s_3x3' % name), suffix='_reduce') | ||
c3x3 = ConvFactory(data=c3x3r, num_filter=num_3x3, kernel=(3, 3), pad=(1, 1), stride=(2, 2), name=('%s_3x3' % name)) | ||
# double 3x3 reduce + double 3x3 | ||
cd3x3r = ConvFactory(data=data, num_filter=num_d3x3red, kernel=(1, 1), name=('%s_double_3x3' % name), suffix='_reduce') | ||
cd3x3 = ConvFactory(data=cd3x3r, num_filter=num_d3x3, kernel=(3, 3), pad=(1, 1), stride=(1, 1), name=('%s_double_3x3_0' % name)) | ||
cd3x3 = ConvFactory(data=cd3x3, num_filter=num_d3x3, kernel=(3, 3), pad=(1, 1), stride=(2, 2), name=('%s_double_3x3_1' % name)) | ||
# pool + proj | ||
pooling = mx.symbol.Pooling(data=data, kernel=(3, 3), stride=(2, 2), pool_type="max", name=('max_pool_%s_pool' % name)) | ||
# concat | ||
concat = mx.symbol.Concat(*[c3x3, cd3x3, pooling], name='ch_concat_%s_chconcat' % name) | ||
return concat | ||
|
||
def get_symbol(num_classes=1000): | ||
# data | ||
data = mx.symbol.Variable(name="data") | ||
# stage 1 | ||
conv1 = ConvFactory(data=data, num_filter=64, kernel=(7, 7), stride=(2, 2), pad=(3, 3), name='conv1') | ||
pool1 = mx.symbol.Pooling(data=conv1, kernel=(3, 3), stride=(2, 2), name='pool1', pool_type='max') | ||
# stage 2 | ||
conv2red = ConvFactory(data=pool1, num_filter=64, kernel=(1, 1), stride=(1, 1), name='conv2red') | ||
conv2 = ConvFactory(data=conv2red, num_filter=192, kernel=(3, 3), stride=(1, 1), pad=(1, 1), name='conv2') | ||
pool2 = mx.symbol.Pooling(data=conv2, kernel=(3, 3), stride=(2, 2), name='pool2', pool_type='max') | ||
# stage 2 | ||
in3a = InceptionFactoryA(pool2, 64, 64, 64, 64, 96, "avg", 32, '3a') | ||
in3b = InceptionFactoryA(in3a, 64, 64, 96, 64, 96, "avg", 64, '3b') | ||
in3c = InceptionFactoryB(in3b, 128, 160, 64, 96, '3c') | ||
# stage 3 | ||
in4a = InceptionFactoryA(in3c, 224, 64, 96, 96, 128, "avg", 128, '4a') | ||
in4b = InceptionFactoryA(in4a, 192, 96, 128, 96, 128, "avg", 128, '4b') | ||
in4c = InceptionFactoryA(in4b, 160, 128, 160, 128, 160, "avg", 128, '4c') | ||
in4d = InceptionFactoryA(in4c, 96, 128, 192, 160, 192, "avg", 128, '4d') | ||
in4e = InceptionFactoryB(in4d, 128, 192, 192, 256, '4e') | ||
# stage 4 | ||
in5a = InceptionFactoryA(in4e, 352, 192, 320, 160, 224, "avg", 128, '5a') | ||
in5b = InceptionFactoryA(in5a, 352, 192, 320, 192, 224, "max", 128, '5b') | ||
# global avg pooling | ||
avg = mx.symbol.Pooling(data=in5b, kernel=(7, 7), stride=(1, 1), name="global_pool", pool_type='avg') | ||
# linear classifier | ||
flatten = mx.symbol.Flatten(data=avg, name='flatten') | ||
fc1 = mx.symbol.FullyConnected(data=flatten, num_hidden=num_classes, name='fc1') | ||
softmax = mx.symbol.SoftmaxOutput(data=fc1, name='softmax') | ||
return softmax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
"""References: | ||
Simonyan, Karen, and Andrew Zisserman. "Very deep convolutional networks for | ||
large-scale image recognition." arXiv preprint arXiv:1409.1556 (2014). | ||
""" | ||
import find_mxnet | ||
import mxnet as mx | ||
|
||
def get_symbol(num_classes = 1000): | ||
## define alexnet | ||
data = mx.symbol.Variable(name="data") | ||
# group 1 | ||
conv1_1 = mx.symbol.Convolution(data=data, kernel=(3, 3), pad=(1, 1), num_filter=64, name="conv1_1") | ||
relu1_1 = mx.symbol.Activation(data=conv1_1, act_type="relu", name="relu1_1") | ||
pool1 = mx.symbol.Pooling( | ||
data=relu1_1, pool_type="max", kernel=(2, 2), stride=(2,2), name="pool1") | ||
# group 2 | ||
conv2_1 = mx.symbol.Convolution( | ||
data=pool1, kernel=(3, 3), pad=(1, 1), num_filter=128, name="conv2_1") | ||
relu2_1 = mx.symbol.Activation(data=conv2_1, act_type="relu", name="relu2_1") | ||
pool2 = mx.symbol.Pooling( | ||
data=relu2_1, pool_type="max", kernel=(2, 2), stride=(2,2), name="pool2") | ||
# group 3 | ||
conv3_1 = mx.symbol.Convolution( | ||
data=pool2, kernel=(3, 3), pad=(1, 1), num_filter=256, name="conv3_1") | ||
relu3_1 = mx.symbol.Activation(data=conv3_1, act_type="relu", name="relu3_1") | ||
conv3_2 = mx.symbol.Convolution( | ||
data=relu3_1, kernel=(3, 3), pad=(1, 1), num_filter=256, name="conv3_2") | ||
relu3_2 = mx.symbol.Activation(data=conv3_2, act_type="relu", name="relu3_2") | ||
pool3 = mx.symbol.Pooling( | ||
data=relu3_2, pool_type="max", kernel=(2, 2), stride=(2,2), name="pool3") | ||
# group 4 | ||
conv4_1 = mx.symbol.Convolution( | ||
data=pool3, kernel=(3, 3), pad=(1, 1), num_filter=512, name="conv4_1") | ||
relu4_1 = mx.symbol.Activation(data=conv4_1, act_type="relu", name="relu4_1") | ||
conv4_2 = mx.symbol.Convolution( | ||
data=relu4_1, kernel=(3, 3), pad=(1, 1), num_filter=512, name="conv4_2") | ||
relu4_2 = mx.symbol.Activation(data=conv4_2, act_type="relu", name="relu4_2") | ||
pool4 = mx.symbol.Pooling( | ||
data=relu4_2, pool_type="max", kernel=(2, 2), stride=(2,2), name="pool4") | ||
# group 5 | ||
conv5_1 = mx.symbol.Convolution( | ||
data=pool4, kernel=(3, 3), pad=(1, 1), num_filter=512, name="conv5_1") | ||
relu5_1 = mx.symbol.Activation(data=conv5_1, act_type="relu", name="relu5_1") | ||
conv5_2 = mx.symbol.Convolution( | ||
data=relu5_1, kernel=(3, 3), pad=(1, 1), num_filter=512, name="conv5_2") | ||
relu5_2 = mx.symbol.Activation(data=conv5_2, act_type="relu", name="conv1_2") | ||
pool5 = mx.symbol.Pooling( | ||
data=relu5_2, pool_type="max", kernel=(2, 2), stride=(2,2), name="pool5") | ||
# group 6 | ||
flatten = mx.symbol.Flatten(data=pool5, name="flatten") | ||
fc6 = mx.symbol.FullyConnected(data=flatten, num_hidden=4096, name="fc6") | ||
relu6 = mx.symbol.Activation(data=fc6, act_type="relu", name="relu6") | ||
drop6 = mx.symbol.Dropout(data=relu6, p=0.5, name="drop6") | ||
# group 7 | ||
fc7 = mx.symbol.FullyConnected(data=drop6, num_hidden=4096, name="fc7") | ||
relu7 = mx.symbol.Activation(data=fc7, act_type="relu", name="relu7") | ||
drop7 = mx.symbol.Dropout(data=relu7, p=0.5, name="drop7") | ||
# output | ||
fc8 = mx.symbol.FullyConnected(data=drop7, num_hidden=num_classes, name="fc8") | ||
softmax = mx.symbol.SoftmaxOutput(data=fc8, name='softmax') | ||
return softmax |