- Sort Score
- Result 10 results
- Languages All
Results 11 - 17 of 17 for TF_TensorData (0.08 sec)
-
tensorflow/c/eager/gradient_checker_test.cc
auto num_elem_numerical = TF_TensorElementCount(numerical_tensor); ASSERT_EQ(num_elem_numerical, num_grad); float* dnumerical = new float[num_elem_numerical]{0}; memcpy(&dnumerical[0], TF_TensorData(numerical_tensor), TF_TensorByteSize(numerical_tensor)); for (int j = 0; j < num_grad; j++) { ASSERT_NEAR(dnumerical[j], expected_grad[j], abs_error); } delete[] dnumerical;
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_test_util.cc
int64_t num_values = 1; for (int i = 0; i < num_dims; ++i) { num_values *= dims[i]; } TF_Tensor* t = TF_AllocateTensor(TF_INT8, dims, num_dims, sizeof(char) * num_values); memcpy(TF_TensorData(t), values, sizeof(char) * num_values); return t; } TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims, const int32_t* values) { int64_t num_values = 1;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Oct 15 03:16:52 UTC 2021 - 17.8K bytes - Viewed (0) -
tensorflow/c/eager/c_api.h
// completed. The memory returned might alias the internal memory used by // TensorFlow. Hence, callers should not mutate this memory (for example by // modifying the memory region pointed to by TF_TensorData() on the returned // TF_Tensor). TF_CAPI_EXPORT extern TF_Tensor* TFE_TensorHandleResolve(TFE_TensorHandle* h, TF_Status* status);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Apr 27 21:07:00 UTC 2023 - 22.8K bytes - Viewed (0) -
tensorflow/c/eager/custom_device_test.cc
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()))); // Free the backing buffer for the variable. op.reset(TFE_NewOp(context.get(), "DestroyResourceOp", status.get())); TFE_OpAddInput(op.get(), var_handle, status.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_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])
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.2K bytes - Viewed (0) -
tensorflow/c/c_api_function_test.cc
ASSERT_EQ(sizeof(int32_t), TF_TensorByteSize(out)); int32_t* output_contents = static_cast<int32_t*>(TF_TensorData(out)); EXPECT_EQ(expected_results[i], *output_contents); } } void CompareInt32Tensor(const std::vector<int32_t>& expected, TF_Tensor* t) { int32_t* data = static_cast<int32_t*>(TF_TensorData(t)); size_t size = TF_TensorByteSize(t); ASSERT_EQ(expected.size() * sizeof(int32_t), size);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Jul 20 22:08:54 UTC 2023 - 63.6K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental.h
TF_Status* status); // Allocate and return a new Tensor on the host. // // The caller must set the Tensor values by writing them to the pointer returned // by TF_TensorData with length TF_TensorByteSize. TF_CAPI_EXPORT extern TF_Tensor* TFE_AllocateHostTensor(TFE_Context* ctx, TF_DataType dtype,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 39.5K bytes - Viewed (0)