- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 52 for tensorproto (0.25 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/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/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) -
tensorflow/compiler/mlir/tensorflow/utils/mangling_util.cc
Status DemangleShape(absl::string_view str, TensorShapeProto* proto) { return ParseTextProto(str, kTensorShapePrefix, proto); } string MangleTensor(const TensorProto& tensor) { return absl::StrCat(kTensorPrefix, PrintShortTextProto(tensor)); } Status DemangleTensor(absl::string_view str, TensorProto* proto) { return ParseTextProto(str, kTensorPrefix, proto); } string MangleDataType(const DataType& dtype) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Feb 26 03:47:51 UTC 2024 - 3.2K bytes - Viewed (0) -
tensorflow/cc/framework/cc_op_gen_util.cc
strings::StrAppend(&ret, shape.dim_size(d)); } strings::StrAppend(&ret, "}"); return ret; } string PrintTensor(const TensorProto& tensor_proto) { Tensor t(tensor_proto.dtype()); CHECK(t.FromProto(tensor_proto)); const int64_t num_elts = t.NumElements(); switch (t.dtype()) { case DT_FLOAT: return PrintArray(num_elts, t.flat<float>().data()); case DT_DOUBLE:
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Feb 26 00:57:05 UTC 2024 - 25K bytes - Viewed (0) -
tensorflow/cc/framework/ops.h
typedef T type; }; // END_SKIP_DOXYGEN TensorProto AsTensorProto() { TensorProto tensor_proto; if (tensor.NumElements() > 1) { tensor.AsProtoTensorContent(&tensor_proto); } else { tensor.AsProtoField(&tensor_proto); } return tensor_proto; } Status status; Tensor tensor; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 13 05:57:22 UTC 2024 - 10.5K bytes - Viewed (0)