- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 257 for shape (0.04 sec)
-
tensorflow/c/eager/parallel_device/parallel_device_lib.h
// devices of a ParallelDevice. If called, ParallelTensor::Shape inspects // `components` to determine a shape. static std::unique_ptr<ParallelTensor> FromTensorHandles( const ParallelDevice& parallel_device, std::vector<TensorHandlePtr> components, TF_Status* status); // Uses the provided shape without additional checks, which avoids blocking // when ParallelTensor::Shape is called.
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 13.1K bytes - Viewed (0) -
tensorflow/c/eager/dlpack_test.cc
dltensor_in->device = {kDLCPU, 0}; dltensor_in->ndim = static_cast<int32_t>(shape.size()); dltensor_in->dtype = {kDLFloat, 32, 1}; dltensor_in->shape = shape.data(); dltensor_in->strides = strides.data(); TFE_TensorHandle* handle = TFE_HandleFromDLPack(&dlm_in, status, ctx); ASSERT_NE(handle, nullptr) << TF_Message(status) << " (shape=[" << absl::StrJoin(shape, ",") << "], strides=[" << absl::StrJoin(strides, ",") << "])";
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Jun 30 03:04:46 UTC 2023 - 4.4K bytes - Viewed (0) -
tensorflow/c/c_api.cc
std::vector<PartialTensorShape> shapes; shapes.reserve(num_shapes); for (int i = 0; i < num_shapes; ++i) { if (num_dims[i] < 0) { shapes.emplace_back(); } else { shapes.emplace_back(ArraySlice<int64_t>( reinterpret_cast<const int64_t*>(dims[i]), num_dims[i])); } } desc->node_builder.Attr(attr_name, shapes); }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 102.3K bytes - Viewed (0) -
tensorflow/c/eager/c_api_debug.cc
std::vector<int64_t> shape; int rank = -1; *status = handle.NumDims(&rank); if (!status->ok()) { return shape; } shape.reserve(rank); for (int i = 0; i < rank; ++i) { int64_t dim; *status = handle.Dim(i, &dim); if (!status->ok()) { return shape; } shape.push_back(dim); } return shape; } } // namespace extern "C" {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 2.5K bytes - Viewed (0) -
tensorflow/c/eager/abstract_tensor_handle.h
virtual absl::Status TensorHandleStatus() const; // Returns tensor shape. If tensor has unknown rank, shape remains untouched. virtual absl::Status Shape(tensorflow::PartialTensorShape* shape) const = 0; // Returns tensor (full) type. // While there is no immediate plan to deprecate dtype and shape in favor // of only using full type type information, this is a future possibility. //
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 3K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental_graph.cc
std::vector<PartialTensorShape> shapes; shapes.reserve(num_values); for (int i = 0; i < num_values; ++i) { if (num_dims[i] < 0) { shapes.emplace_back(); } else { shapes.emplace_back(ArraySlice<int64_t>( reinterpret_cast<const int64_t*>(dims[i]), num_dims[i])); } } op_->node_builder.Attr(attr_name, shapes); return absl::OkStatus(); }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 15.7K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib.cc
new ParallelTensor(parallel_device, std::move(components), dtype)); } absl::Status ParallelTensor::Shape(const std::vector<int64_t>** shape) const { if (!shape_.has_value()) { TF_Status status; PartialTensorShape combined_shape; TF_RETURN_IF_ERROR(unwrap(tensors_[0].get())->Shape(&combined_shape)); for (const TensorHandlePtr& component : tensors_) { PartialTensorShape component_shape;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 25.9K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc
ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get()); const std::vector<std::unique_ptr<ParallelTensor>>& handles = *outputs; const std::vector<int64_t>* shape; absl::Status s = handles[0]->Shape(&shape); ASSERT_TRUE(s.ok()); EXPECT_EQ(0, shape->size()); } TEST(PARALLEL_DEVICE_LIB, TestCancelOnError) { std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status( TF_NewStatus(), TF_DeleteStatus);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 15.6K bytes - Viewed (0) -
tensorflow/c/eager/abstract_tensor_handle.cc
namespace tensorflow { std::string AbstractTensorHandle::DebugString() const { PartialTensorShape shape; absl::Status s = Shape(&shape); std::string shape_string; if (!s.ok()) { shape_string = "<error computing shape>"; } else { shape_string = shape.DebugString(); } return absl::StrCat("TensorHandle(shape=", shape_string, ", dtype=", DataType_Name(DataType()),
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 1.4K bytes - Viewed (0) -
tensorflow/c/eager/immediate_execution_tensor_handle.cc
namespace tensorflow { std::string ImmediateExecutionTensorHandle::DebugString() const { PartialTensorShape shape; std::string shape_string; if (Shape(&shape).ok()) { shape_string = shape.DebugString(); } else { shape_string = "<error computing shape>"; } std::string value_string; if (!SummarizeValue(value_string).ok()) { value_string = "<error computing value>"; }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:24:07 UTC 2024 - 2.1K bytes - Viewed (0)