MCPcopy
hub / github.com/apache/tvm / from_const

Method from_const

python/tvm/relax/frontend/nn/core.py:115–117  ·  view source on GitHub ↗

Construct a tensor from numpy constants.

(data)

Source from the content-addressed store, hash-verified

113
114 @staticmethod
115 def from_const(data) -> "Tensor":
116 """Construct a tensor from numpy constants."""
117 return Tensor(_expr=rx.const(data))
118
119 @staticmethod
120 def from_scalar(data: int | float, dtype: str) -> "Tensor":

Callers 3

multinomial_from_uniformFunction · 0.80
test_tensor_from_numpyFunction · 0.80

Calls 1

TensorClass · 0.70

Tested by 1

test_tensor_from_numpyFunction · 0.64