Helper method for converting shapes vector to TensorProperty.
| 54 | |
| 55 | // Helper method for converting shapes vector to TensorProperty. |
| 56 | OpInfo::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 | |
| 64 | TEST(UtilsTest, ConvOpInfo) { |
| 65 | int batch = 32; |
no test coverage detected