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

Function _to_tensor

tensorflow/python/keras/backend.py:671–681  ·  view source on GitHub ↗

Convert the input `x` to a tensor of type `dtype`. Arguments: x: An object to be converted (numpy array, list, tensors). dtype: The destination type. Returns: A tensor.

(x, dtype)

Source from the content-addressed store, hash-verified

669
670
671def _to_tensor(x, dtype):
672 """Convert the input `x` to a tensor of type `dtype`.
673
674 Arguments:
675 x: An object to be converted (numpy array, list, tensors).
676 dtype: The destination type.
677
678 Returns:
679 A tensor.
680 """
681 return ops.convert_to_tensor(x, dtype=dtype)
682
683
684@keras_export('keras.backend.is_sparse')

Callers 1

reluFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected