Committed caffe-tensorflow modifications to PSPNet BN layer

This commit is contained in:
VladK
2017-07-13 11:12:02 +03:00
parent d6cfad81d1
commit ed32c508ea
3 changed files with 33 additions and 4 deletions
@@ -104,6 +104,9 @@ class TensorFlowMapper(NodeMapper):
def map_relu(self, node):
return TensorFlowNode('relu')
def map_interp(self, node):
return TensorFlowNode('relu')
def map_pooling(self, node):
pool_type = node.parameters.pool
if pool_type == 0:
@@ -150,6 +153,12 @@ class TensorFlowMapper(NodeMapper):
kwargs = {} if scale_offset else {'scale_offset': False}
return MaybeActivated(node, default=False)('batch_normalization', **kwargs)
def map_bn(self, node):
scale_offset = len(node.data) == 4
print node
kwargs = {} if scale_offset else {'scale_offset': False}
return MaybeActivated(node, default=False)('batch_normalization', **kwargs)
def map_eltwise(self, node):
operations = {0: 'multiply', 1: 'add', 2: 'max'}
op_code = node.parameters.operation