- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for TF_TensorElementCount (0.1 sec)
-
tensorflow/c/eager/gradient_checker.cc
// Convert from AbstractTensor to TF_Tensor. TF_Tensor* theta_tensor; TF_RETURN_IF_ERROR(GetValue(theta, &theta_tensor)); // Get number of elements and fill data. int num_elems = TF_TensorElementCount(theta_tensor); vector<float> theta_data(num_elems); memcpy(theta_data.data(), TF_TensorData(theta_tensor), TF_TensorByteSize(theta_tensor)); // Initialize space for the numerical gradient.
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/c/eager/gradient_checker_test.cc
} TF_Tensor* numerical_tensor; s = GetValue(numerical_grad.get(), &numerical_tensor); ASSERT_EQ(errors::OK, s.code()) << s.message(); 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),
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_test.cc
TF_Tensor* b = TF_AllocateTensor(TF_UINT64, nullptr, 0, TF_DataTypeSize(TF_UINT64)); EXPECT_NE(a, nullptr); EXPECT_NE(b, nullptr); EXPECT_EQ(6, TF_TensorElementCount(a)); EXPECT_EQ(1, TF_TensorElementCount(b)); EXPECT_EQ(6 * TF_DataTypeSize(TF_UINT64), TF_TensorByteSize(a)); EXPECT_EQ(TF_DataTypeSize(TF_UINT64), TF_TensorByteSize(b)); int64_t new_dims[] = {3, 2};
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0)