Skip to content

Commit 41340b3

Browse files
committed
update biasadd tf
1 parent 302a7ae commit 41340b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorlayerx/backend/ops/tensorflow_nn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class BiasAdd(object):
400400
"""
401401

402402
def __init__(self, data_format=None):
403-
self.data_format = data_format
403+
self.data_format, _ = preprocess_2d_format(data_format, None)
404404

405405
def __call__(self, x, bias):
406406
return tf.nn.bias_add(x, bias, data_format=self.data_format)
@@ -425,7 +425,7 @@ def bias_add(x, bias, data_format=None, name=None):
425425
-------
426426
A Tensor with the same type as value.
427427
"""
428-
428+
data_format , _ = preprocess_2d_format(data_format, None)
429429
x = tf.nn.bias_add(x, bias, data_format=data_format, name=name)
430430
return x
431431

0 commit comments

Comments
 (0)