Skip to content

Commit 535a9c3

Browse files
lingvo-botcopybara-github
authored andcommitted
Add dtype information in the logs when creating variables in lingvo to allow for easier debugging
PiperOrigin-RevId: 477567879
1 parent 4c693e2 commit 535a9c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lingvo/core/py_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,8 +1791,8 @@ def MaybeReuseFromVariableStore(next_creator, **kwargs):
17911791
'Expected %s but created variable %s. Did you mean to set reuse=True '
17921792
'or reuse=tf.AUTO_REUSE in VarScope, or did not create a '
17931793
'VariableStore for variable reuse?' % (f'{var_name}/var:0', var.name))
1794-
tf.logging.vlog(0, 'Creating var %s shape=%s on device %s', var.name,
1795-
var.shape, var.device)
1794+
tf.logging.vlog(0, 'Creating var %s dtype=%s shape=%s on device %s', var.name,
1795+
var.dtype, var.shape, var.device)
17961796
for col in p.collections:
17971797
tf.add_to_collection(col, var)
17981798
if store is not None:

0 commit comments

Comments
 (0)