ci: Redo format.sh --all script & backfill lint fixes (#9956)

This commit is contained in:
Barak Michener
2020-08-07 16:49:49 -07:00
committed by GitHub
parent 1d01c668f0
commit 8e76796fd0
147 changed files with 702 additions and 636 deletions
+7 -3
View File
@@ -200,9 +200,13 @@ def get_variable(value,
if isinstance(value, float) else tf.int32
if isinstance(value, int) else None)
return tf.compat.v1.get_variable(
tf_name, initializer=value, dtype=dtype, trainable=trainable,
**({} if shape is None else {"shape": shape})
)
tf_name,
initializer=value,
dtype=dtype,
trainable=trainable,
**({} if shape is None else {
"shape": shape
}))
elif framework == "torch" and torch_tensor is True:
torch, _ = try_import_torch()
var_ = torch.from_numpy(value)