- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for tensorproto (0.15 sec)
-
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/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/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/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) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc
} TEST(ConvertTensorProtoTest, SplatTensor) { // We construct a sparse TensorProto representing 2^35 float elements, all of // 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);
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/mlir/quantization/stablehlo/utils/tf_type_utils.cc
const llvm::StringRef mangled_tensor_proto, TensorType tensor_type) { ::tensorflow::TensorProto tensor_proto; absl::Status status = ::tensorflow::mangling_util::DemangleTensor( mangled_tensor_proto, &tensor_proto); if (!status.ok()) { return failure(); } ::tensorflow::Tensor t; if (!t.FromProto(tensor_proto)) { return failure(); } if (t.dtype() == ::tensorflow::DT_QINT8) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/const_tensor_utils.h
bool truncate = false); absl::StatusOr<mlir::ElementsAttr> ConvertFloatBuffer( mlir::RankedTensorType shaped_type, const std::vector<uint8_t>& buffer); tensorflow::TensorProto ConvertTfliteConstTensor( const tflite::TensorT& tensor, const std::vector<uint8_t>& buffer); } // namespace TFL } // namespace mlir
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 2.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/constant_utils.cc
} else if (auto complex_type = mlir::dyn_cast<mlir::ComplexType>(element_type)) { 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});
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/jit/clone_constants_for_better_clustering.cc
} } new_in->set_assigned_device_name(n->assigned_device_name()); return new_in; } namespace { absl::StatusOr<bool> IsConstantSmall(Node* n) { const TensorProto* proto = nullptr; TF_RETURN_IF_ERROR(GetNodeAttr(n->def(), "value", &proto)); int64_t total_elements = 1; for (const auto& dim : proto->tensor_shape().dim()) { if (dim.size() < 0) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 12 06:33:33 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/compiler/jit/xla_device.cc
Status XlaDevice::MakeTensorFromProto(DeviceContext* device_context, const TensorProto& tensor_proto, const AllocatorAttributes alloc_attrs, Tensor* tensor) { Tensor parsed(tensor_proto.dtype()); if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { return errors::InvalidArgument("Cannot parse tensor from proto: ",
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 20 21:05:42 UTC 2024 - 24.3K bytes - Viewed (0)