- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 21 for TF_DeleteTensor (0.21 sec)
-
tensorflow/c/eager/c_api_test_util.h
memcpy(TF_TensorData(t), data, TF_TensorByteSize(t)); TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_DeleteTensor(t); TF_DeleteStatus(status); return th; } // Return a scalar tensor handle with given values. template <class T, TF_DataType datatype>
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Jul 17 23:43:59 UTC 2023 - 7.7K bytes - Viewed (0) -
tensorflow/c/c_test_util.h
#include "tensorflow/core/framework/node_def.pb.h" #include "tensorflow/core/framework/types.pb.h" #include "tensorflow/core/platform/test.h" using ::tensorflow::string; typedef std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> unique_tensor_ptr; TF_Tensor* BoolTensor(int32_t v); // Create a tensor with values of type TF_INT8 provided by `values`. TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 09 01:06:53 UTC 2018 - 6K bytes - Viewed (0) -
tensorflow/c/eager/custom_device_test.cc
UnpackTensorHandle(var_value, status.get()); ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get()); std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> resolved_value( TFE_TensorHandleResolve(var_value_unpacked, status.get()), TF_DeleteTensor); ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get()); ASSERT_EQ(111., *static_cast<float*>(TF_TensorData(resolved_value.get())));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 27 23:39:24 UTC 2020 - 18.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_distributed_test.cc
TFE_DeleteTensorHandle(retvals[0]); float sum = 0; EXPECT_EQ(sizeof(sum), TF_TensorByteSize(t)); memcpy(&sum, TF_TensorData(t), TF_TensorByteSize(t)); TF_DeleteTensor(t); EXPECT_EQ(sum, 6.0); TFE_DeleteTensorHandle(h0); TFE_DeleteTensorHandle(h1); TFE_DeleteTensorHandle(h2); TFE_Executor* executor = TFE_ContextGetExecutorForThread(ctx);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 23.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_remote_test_util.cc
TFE_DeleteTensorHandle(retval_task0); float product[4] = {0}; EXPECT_EQ(sizeof(product), TF_TensorByteSize(t)); memcpy(&product[0], TF_TensorData(t), TF_TensorByteSize(t)); TF_DeleteTensor(t); EXPECT_EQ(7, product[0]); EXPECT_EQ(10, product[1]); EXPECT_EQ(15, product[2]); EXPECT_EQ(22, product[3]); TFE_DeleteTensorHandle(h0_task0); TFE_DeleteTensorHandle(h1_task0);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Dec 11 22:56:03 UTC 2020 - 9.1K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib.h
std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor( TF_NewTensor( datatype_enum, /*dims=*/nullptr, /*num_dims=*/0, device_value.release(), sizeof(DataType), [](void* data, size_t, void* arg) { delete reinterpret_cast<DataType*>(data); }, nullptr), TF_DeleteTensor);
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/gradient_checker_test.cc
TF_TensorByteSize(numerical_tensor)); for (int j = 0; j < num_grad; j++) { ASSERT_NEAR(dnumerical[j], expected_grad[j], abs_error); } delete[] dnumerical; TF_DeleteTensor(numerical_tensor); } absl::Status MatMulModel(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, absl::Span<AbstractTensorHandle*> outputs) {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 6.5K bytes - Viewed (0) -
tensorflow/c/c_api_experimental.h
// `tensor_id`, associated with `session`. There must be a graph node named // "fifo_queue_dequeue_<tensor_id>", to be executed by this API call. // Caller must call TF_DeleteTensor() over the returned tensor. If the queue is // empty, this call is blocked. // // Tensors are enqueued via the corresponding TF enqueue op. // TODO(hongm): Add support for `timeout_ms`.
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Apr 27 21:07:00 UTC 2023 - 15.1K bytes - Viewed (0) -
tensorflow/c/c_api.h
int max_values, TF_Status* status); // Gets the TF_Tensor valued attribute of `attr_name` of `oper`. // // Allocates a new TF_Tensor which the caller is expected to take // ownership of (and can deallocate using TF_DeleteTensor). TF_CAPI_EXPORT extern void TF_OperationGetAttrTensor(TF_Operation* oper, const char* attr_name, TF_Tensor** value,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Oct 26 21:08:15 UTC 2023 - 82.3K bytes - Viewed (0) -
tensorflow/c/eager/c_api_cluster_test.cc
std::unique_ptr<float[]> actual_values(new float[expected_values.size()]); EXPECT_EQ(sizeof(float) * expected_values.size(), TF_TensorByteSize(t)); memcpy(actual_values.get(), TF_TensorData(t), TF_TensorByteSize(t)); TF_DeleteTensor(t); for (int i = 0; i < expected_values.size(); i++) { EXPECT_EQ(expected_values[i], actual_values[i]) << "Mismatch in expected values at (zero-based) index " << i; } }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.2K bytes - Viewed (0)