- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for mutable_tensor_shape (0.25 sec)
-
tensorflow/compiler/mlir/lite/utils/constant_utils.cc
auto etype = complex_type.getElementType(); if (etype.isF32()) { tensorflow::TensorProto repr; repr.set_dtype(tensorflow::DT_COMPLEX64); tensorflow::TensorShapeProto* shape = repr.mutable_tensor_shape(); shape->set_unknown_rank(false); shape->add_dim()->set_size(int64_t{1}); std::string content; auto complex_value = std::complex<float>(static_cast<float>(value), 0.0f);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc
// Attribute for that proto, and finally splat the Attribute. TensorProto tensor_copy = input_tensor; auto* shape = tensor_copy.mutable_tensor_shape(); shape->clear_dim(); shape->add_dim()->set_size(1); TF_ASSIGN_OR_RETURN(ElementsAttr single_attr, ConvertTensorProto(tensor_copy, builder));
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
// them 42. Our conversion routine should not materialize these elements when // creating the Attribute. If it tries to, we'll crash OOM here. TensorProto tensor; tensor.set_dtype(DT_FLOAT); tensor.mutable_tensor_shape()->add_dim()->set_size(1ULL << 35); tensor.add_float_val(42.0); mlir::MLIRContext context; mlir::Builder builder(&context); TF_ASSERT_OK_AND_ASSIGN(mlir::ElementsAttr attribute,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0) -
tensorflow/compiler/jit/shape_inference.cc
DataType dtype = n->output_type(0); AddNodeAttr("dtype", dtype, &const_def); TensorProto value; value.set_dtype(dtype); value.mutable_tensor_shape()->add_dim()->set_size( shape_proto.dim_size()); for (const auto& dim : shape_proto.dim()) { if (dtype == DT_INT32) { value.add_int_val(dim.size());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 31 00:41:19 UTC 2024 - 13K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc
const TensorT& tensor, const std::vector<uint8_t>& buffer) { tensorflow::TensorProto ret; ret.set_dtype(TflTypeToTfType(tensor.type)); tensorflow::TensorShapeProto* shape = ret.mutable_tensor_shape(); shape->set_unknown_rank(false); for (auto dim : tensor.shape) { shape->add_dim()->set_size(int64_t{dim}); } // TensorFlow Lite uses tflite::DynamicBufer to encode vector of strings.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 16.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_import.cc
tensorflow::TensorProto repr = tfl::ConvertTfliteConstTensor(tensor, buffer); repr.clear_tensor_shape(); if (tfl::IsQuantized(tensor)) { repr.mutable_tensor_shape()->add_dim()->set_size(buffer.size()); repr.set_dtype(tensorflow::DT_INT8); } else { repr.mutable_tensor_shape()->add_dim()->set_size( buffer.size() / (shaped_type.getElementTypeBitWidth() / CHAR_BIT)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 66.8K bytes - Viewed (0) -
tensorflow/compiler/jit/encapsulate_subgraphs_pass.cc
const TensorShapeProto& shape, Graph* graph_out) { DataType data_type = src_node->output_type(src_port); TensorProto dummy_proto; dummy_proto.set_dtype(data_type); *dummy_proto.mutable_tensor_shape() = shape; // Don't set any value field in the proto, since it is only going to be used // for shape inference. GraphDefBuilder::Options options(graph_out, /*status=*/nullptr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 08:47:20 UTC 2024 - 51K bytes - Viewed (0) -
tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc
NodeBuilder node_builder(opts.GetNameForOp("Const"), "Const", opts.op_registry()); TensorProto value; value.set_dtype(dtype); for (int dim : shape) { value.mutable_tensor_shape()->add_dim()->set_size(dim); } return opts.WithAttr("value", value) .WithAttr("dtype", dtype) .FinalizeBuilder(&node_builder); } Node* KnownShape(absl::Span<const int> shape,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 08:47:20 UTC 2024 - 113.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/translate/import_model.cc
inputs.reserve(assets.size()); for (const auto& asset : assets) { TensorInfo tensor_info; tensor_info.set_name(asset.tensor_name); tensor_info.set_dtype(DT_STRING); tensor_info.mutable_tensor_shape(); inputs.push_back({asset.tensor_name, tensor_info}); } std::unordered_map<std::string, std::string> tf_name_to_mlir_name; TF_ASSIGN_OR_RETURN(auto sub_module,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 01 11:17:36 UTC 2024 - 183.2K bytes - Viewed (0)