- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ConvertStringTensor (0.27 sec)
-
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc
auto buffer = llvm::ArrayRef(static_cast<char*>(tensor.data()), tensor.TotalBytes()); return mlir::DenseElementsAttr::getFromRawBuffer(type, buffer); } absl::StatusOr<ElementsAttr> ConvertStringTensor(const Tensor& input_tensor, ShapedType type) { // Extract to a vector of StringRefs for converting. auto arr = input_tensor.flat<tstring>();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 20.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc
mlir::Builder b(&context); PartialTensorShape output_shape = ConvertTypeToTensorShape(b.getF32Type()); EXPECT_TRUE(output_shape.IsIdenticalTo(TensorShape())); } TEST(ConvertTypeToTensorTypeTest, ConvertStringTensor) { mlir::MLIRContext context; RegisterDialects(context); mlir::Builder b(&context); // Create the sample tensor to convert. Tensor tensor(DT_STRING, TensorShape({1, 2, 2, 1}));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0)