MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / _bias_add

Function _bias_add

tensorlayer/layers/normalization.py:100–107  ·  view source on GitHub ↗

Alternative implementation of tf.nn.bias_add which is compatiable with tensorRT.

(x, b, data_format)

Source from the content-addressed store, hash-verified

98
99
100def _bias_add(x, b, data_format):
101 """Alternative implementation of tf.nn.bias_add which is compatiable with tensorRT."""
102 if data_format == 'NHWC':
103 return tf.add(x, b)
104 elif data_format == 'NCHW':
105 return tf.add(x, b)
106 else:
107 raise ValueError('invalid data_format: %s' % data_format)
108
109
110def _compute_shape(tensors):

Callers 1

batch_normalizationFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…