- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 66 for tensorproto (0.2 sec)
-
tensorflow/cc/saved_model/util_test.cc
} template <class T> TensorProto CreateTensorProto(const T& val) { Tensor tensor(val); TensorProto tensor_proto; tensor.AsProtoTensorContent(&tensor_proto); return tensor_proto; } void ConvertOutputTensorToProto( std::vector<std::pair<string, Tensor>>& inputs, std::vector<std::pair<string, TensorProto>>& protos) { for (const auto& input : inputs) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc
} return absl::OkStatus(); } Status ConvertToTensor(const mlir::ElementsAttr attr, Tensor* output_tensor) { TensorProto tensor_proto; TF_RETURN_IF_ERROR(ConvertToTensorProto(attr, &tensor_proto)); if (!output_tensor->FromProto(tensor_proto)) { return InvalidArgument("Couldn't convert tensor proto to tensor."); } return absl::OkStatus(); }
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/cc/saved_model/util.cc
absl::StrJoin(GetMapKeys(signature.defaults()), ","))); } tensor_proto = &default_inputs_iter->second; } else { tensor_proto = &iter->second; seen_request_inputs.insert(alias); } Tensor tensor; if (!tensor.FromProto(*tensor_proto)) { return absl::InvalidArgumentError( absl::StrCat("tensor parsing error: ", alias)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Feb 10 10:25:28 UTC 2024 - 3.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/mangling_util.h
// Demangle a string mangled with MangleShape. Status DemangleShape(absl::string_view str, TensorShapeProto* proto); // Return a TensorProto mangled as a string. string MangleTensor(const TensorProto& tensor); // Demangle a string mangled with MangleTensor. Status DemangleTensor(absl::string_view str, TensorProto* proto); // Return a DataType mangled as a string. string MangleDataType(const DataType& dtype);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 28 22:08:30 UTC 2020 - 2.4K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/constant_loading_test.cc
Tensor expected(dtype, shape); testing::FillNumericTensorBuffer(expected.dtype(), expected.NumElements(), expected.data(), 42); // Serialize it to a Tensorproto TensorProto proto; if (tensorproto_use_tensor_content) { expected.AsProtoTensorContent(&proto); } else { expected.AsProtoField(&proto); } // Revival should succeed w/o errors
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 11 01:20:50 UTC 2021 - 4.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils_test.cc
tensor.matrix<tsl::qint8>()(1, 0) = tsl::qint8(3); tensor.matrix<tsl::qint8>()(1, 1) = tsl::qint8(4); ::tensorflow::TensorProto tensor_proto; tensor.AsProtoTensorContent(&tensor_proto); return ::tensorflow::mangling_util::MangleTensor(tensor_proto); } std::string GetQint16Tensor() { ::tensorflow::Tensor tensor(::tensorflow::DT_QINT16, {2, 2}); tensor.matrix<tsl::qint16>()(0, 0) = tsl::qint16(1);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9K bytes - Viewed (0) -
tensorflow/c/kernels_test.cc
tensor_proto.mutable_tensor_shape()->add_dim()->set_size(2); tensor_proto.mutable_tensor_shape()->add_dim()->set_size(3); tensor_proto.set_dtype(DT_FLOAT); tensor_proto.add_float_val(5.0f); tensor_proto.add_float_val(6.0f); tensor_proto.add_float_val(7.0f); tensor_proto.add_float_val(8.0f); tensor_proto.add_float_val(9.0f); tensor_proto.add_float_val(10.0f);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 50.4K bytes - Viewed (0) -
tensorflow/cc/saved_model/util.h
// Get the default input value from signature if it's missing in the request // inputs. If `is_alias` is set to true, the keys of the `request_inputs` are // alias names rather than the feed names in the graph. Status GetInputValues( const SignatureDef& signature, const ::google::protobuf::Map<std::string, ::tensorflow::TensorProto>& request_inputs,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Jul 31 23:00:51 UTC 2023 - 2.1K bytes - Viewed (0) -
tensorflow/cc/framework/cc_op_gen_util.h
for (int64_t i = 0; i < num_elts; ++i) { if (i > 0) strings::StrAppend(&ret, ", "); strings::StrAppend(&ret, array[i]); } return ret; } string PrintTensor(const TensorProto& tensor_proto); string PrintTensorProto(const TensorProto& proto); string PrintAttrValue(StringPiece, const AttrValue& attr_value); bool IsEmptyList(const AttrValue::ListValue& list); string ToCamelCase(StringPiece str);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Feb 26 00:57:05 UTC 2024 - 4.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.h
namespace tensorflow { using tsl::StatusOr; // Converts an TensorFlow tensor proto into an MLIR elements attribute. absl::StatusOr<mlir::ElementsAttr> ConvertTensorProto( const TensorProto& input_tensor, mlir::Builder* builder); // Converts an TensorFlow tensor into an MLIR elements attribute. absl::StatusOr<mlir::ElementsAttr> ConvertTensor(const Tensor& input_tensor,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 2.9K bytes - Viewed (0)