mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Avoid using variables as booleans (similarly to tensors).
PiperOrigin-RevId: 173956625
This commit is contained in:
parent
a60cd87c43
commit
9aaa49a4e2
|
|
@ -1267,7 +1267,7 @@ def convolution2d_transpose(
|
|||
|
||||
# Add variables to collections.
|
||||
_add_variable_to_collections(layer.kernel, variables_collections, 'weights')
|
||||
if layer.bias:
|
||||
if layer.bias is not None:
|
||||
_add_variable_to_collections(layer.bias, variables_collections, 'biases')
|
||||
|
||||
if normalizer_fn is not None:
|
||||
|
|
@ -1376,7 +1376,7 @@ def convolution3d_transpose(
|
|||
|
||||
# Add variables to collections.
|
||||
_add_variable_to_collections(layer.kernel, variables_collections, 'weights')
|
||||
if layer.bias:
|
||||
if layer.bias is not None:
|
||||
_add_variable_to_collections(layer.bias, variables_collections, 'biases')
|
||||
|
||||
if normalizer_fn is not None:
|
||||
|
|
@ -2522,7 +2522,7 @@ def separable_convolution2d(
|
|||
variables_collections, 'weights')
|
||||
_add_variable_to_collections(layer.pointwise_kernel,
|
||||
variables_collections, 'weights')
|
||||
if layer.bias:
|
||||
if layer.bias is not None:
|
||||
_add_variable_to_collections(layer.bias,
|
||||
variables_collections, 'biases')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user