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

Function AsTensor

tensorflow/core/kernels/mkl_reshape_op_test.cc:65–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63// Constructs a tensor of "shape" with values "vals".
64template <typename T>
65Tensor AsTensor(gtl::ArraySlice<T> vals, const TensorShape& shape) {
66 Tensor ret;
67 CHECK(ret.CopyFrom(AsTensor(vals), shape));
68 return ret;
69}
70
71#define S_TENSOR(size, ...) test::AsTensor<int32>({__VA_ARGS__}, {size})
72

Calls 1

CopyFromMethod · 0.45

Tested by

no test coverage detected