MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _zeros_like

Function _zeros_like

tensorflow/python/ops/while_v2.py:510–515  ·  view source on GitHub ↗

Like array_ops.zeros_like() but also accepts resource var handles.

(op_output)

Source from the content-addressed store, hash-verified

508# TODO(skyewm): make this return constants if op_output's shape is fully
509# defined (this can be done by checking the "shape" attr of resource vars).
510def _zeros_like(op_output):
511 """Like array_ops.zeros_like() but also accepts resource var handles."""
512 if op_output.dtype == dtypes.resource:
513 return array_ops.zeros(
514 gen_resource_variable_ops.variable_shape(op_output))
515 return array_ops.zeros_like(op_output)
516
517
518def _is_trainable(tensor):

Callers 1

_preprocess_gradFunction · 0.85

Calls 1

variable_shapeMethod · 0.45

Tested by

no test coverage detected