- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for tensorproto (0.28 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/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) -
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/c/experimental/saved_model/core/saved_model_utils.cc
return errors::FailedPrecondition("Unable to find Const operation '", const_op_name, "'s value attribute"); } const TensorProto& tensor_proto = attr_name_and_value->second.tensor(); return internal::TensorProtoToConstant(ctx, tensor_proto, output); } // Perform some basic sanity checks on SavedConcreteFunction's input and // output signatures with respect to the corresponding FunctionDef's input
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jan 12 19:17:46 UTC 2023 - 24K bytes - Viewed (0) -
tensorflow/compiler/jit/xla_device.h
TF_LOCKS_EXCLUDED(mu_); Status MakeTensorFromProto(const TensorProto& tensor_proto, const AllocatorAttributes alloc_attrs, Tensor* tensor) override TF_LOCKS_EXCLUDED(mu_); Status MakeTensorFromProto(DeviceContext* device_context, const TensorProto& tensor_proto, const AllocatorAttributes alloc_attrs,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 21 09:53:30 UTC 2024 - 13.4K bytes - Viewed (0) -
tensorflow/compiler/jit/node_matchers.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Jun 03 16:15:20 UTC 2022 - 16.8K 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) -
tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc
} } return absl::InvalidArgumentError(absl::StrCat( "unsupported bit width ", elem_type.getIntOrFloatBitWidth())); } tensorflow::TensorProto ConvertTfliteConstTensor( 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);
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/tensorflow/utils/export_utils.cc
break; default: return errors::Unimplemented("Unhandled nested attribute!"); } } else if (auto attr = mlir::dyn_cast<mlir::ElementsAttr>(a)) { TensorProto tensor; TF_RETURN_IF_ERROR(ConvertToTensorProto(attr, &tensor)); *list->add_tensor() = tensor; } else if (auto attr = mlir::dyn_cast<mlir::FlatSymbolRefAttr>(a)) { AttrValue attr_val;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 19.7K bytes - Viewed (0)