提交 54587706 编写于 作者: W wanglong03

fix code style

上级 4ad6b207
...@@ -91,6 +91,8 @@ LayerType = type('LayerType', (), {t: t for t in LAYER_TYPES}) ...@@ -91,6 +91,8 @@ LayerType = type('LayerType', (), {t: t for t in LAYER_TYPES})
#map the layer name in V1 to standard name #map the layer name in V1 to standard name
V1_LAYER_MAP = {'_not_init_': True} V1_LAYER_MAP = {'_not_init_': True}
def get_v1_layer_map(): def get_v1_layer_map():
global V1_LAYER_MAP global V1_LAYER_MAP
if '_not_init_' not in V1_LAYER_MAP: if '_not_init_' not in V1_LAYER_MAP:
......
...@@ -285,8 +285,5 @@ class Network(object): ...@@ -285,8 +285,5 @@ class Network(object):
def dropout(self, input, drop_prob, name, is_test=True): def dropout(self, input, drop_prob, name, is_test=True):
fluid = import_fluid() fluid = import_fluid()
output = fluid.layers.dropout( output = fluid.layers.dropout(
input, input, dropout_prob=drop_prob, is_test=is_test, name=name)
dropout_prob=drop_prob,
is_test=is_test,
name=name)
return output return output
...@@ -132,8 +132,7 @@ class TensorFlowMapper(NodeMapper): ...@@ -132,8 +132,7 @@ class TensorFlowMapper(NodeMapper):
# just scales by alpha (as does Krizhevsky's paper). # just scales by alpha (as does Krizhevsky's paper).
# We'll account for that here. # We'll account for that here.
alpha = params.alpha / float(params.local_size) alpha = params.alpha / float(params.local_size)
return TensorFlowNode('lrn', return TensorFlowNode('lrn', params.local_size, alpha, params.beta)
params.local_size, alpha, params.beta)
def map_concat(self, node): def map_concat(self, node):
return TensorFlowNode('concat', node.parameters.axis) return TensorFlowNode('concat', node.parameters.axis)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册