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

Function ShapeToTensorProperty

tensorflow/core/grappler/costs/utils_test.cc:56–62  ·  view source on GitHub ↗

Helper method for converting shapes vector to TensorProperty.

Source from the content-addressed store, hash-verified

54
55// Helper method for converting shapes vector to TensorProperty.
56OpInfo::TensorProperties ShapeToTensorProperty(const std::vector<int>& shapes,
57 const DataType& data_type) {
58 OpInfo::TensorProperties prop;
59 prop.set_dtype(data_type);
60 for (int shape : shapes) prop.mutable_shape()->add_dim()->set_size(shape);
61 return prop;
62}
63
64TEST(UtilsTest, ConvOpInfo) {
65 int batch = 32;

Callers 1

TESTFunction · 0.85

Calls 3

set_dtypeMethod · 0.45
set_sizeMethod · 0.45
mutable_shapeMethod · 0.45

Tested by

no test coverage detected