- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for TF_TensorData (0.1 sec)
-
tensorflow/c/eager/gradient_checker.cc
// 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. vector<float> dtheta_approx(num_elems); // Get theta shape and store in theta_dims.
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/c_api_test_util.cc
TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, float value) { float data[] = {value}; TF_Status* status = TF_NewStatus(); TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, nullptr, 0, status); memcpy(TF_TensorData(t), &data[0], 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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test.cc
if (TF_GetCode(status.get()) != TF_OK) { ADD_FAILURE() << tag; continue; } EXPECT_EQ(TF_TensorByteSize(t), TF_TensorByteSize(tcopy)) << tag; EXPECT_EQ( 0, memcmp(TF_TensorData(t), TF_TensorData(tcopy), TF_TensorByteSize(t))) << tag; TF_DeleteTensor(tcopy); } TF_DeleteDeviceList(devices); TF_DeleteTensor(t); TFE_DeleteTensorHandle(hcpu); TFE_DeleteContext(ctx);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 20:50:20 UTC 2023 - 94.6K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
// Check that a write to one tensor shows up in the other. *(static_cast<int64_t*>(TF_TensorData(a))) = 4; EXPECT_EQ(4, *(static_cast<int64_t*>(TF_TensorData(b)))); *(static_cast<int64_t*>(TF_TensorData(b))) = 6; EXPECT_EQ(6, *(static_cast<int64_t*>(TF_TensorData(a)))); TF_DeleteTensor(a); TF_DeleteTensor(b); } TEST(CAPI, TestFromProto) {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_Tensor* t = TF_AllocateTensor(TF_INT32, nullptr, 0, 1 * sizeof(tensorflow::int32)); *reinterpret_cast<tensorflow::int32*>(TF_TensorData(t)) = 42; TFE_TensorHandle* h = TFE_NewTensorHandle(t, status); ASSERT_TRUE(TF_GetCode(status) == TF_OK) << TF_Message(status); TF_DeleteTensor(t); TFE_Op* op = TFE_NewOp(ctx, "ident", status);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 03:14:26 UTC 2023 - 31.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental_test.cc
ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get()); TF_Tensor* result_tensor = TFE_TensorHandleResolve(result_t, status.get()); float* result_value = static_cast<float*>(TF_TensorData(result_tensor)); EXPECT_EQ(*result_value, 4.0); TF_DeleteTensor(result_tensor); TF_DeleteAbstractTensor(result); TF_DeleteOutputList(o); TF_DeleteExecutionContext(ctx); } // MatMul Test
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 39.1K bytes - Viewed (0) -
tensorflow/c/eager/c_api_remote_test.cc
TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); 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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Aug 12 00:14:22 UTC 2020 - 5.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test_util.h
const int64_t* dims, int num_dims) { TF_Status* status = TF_NewStatus(); TF_Tensor* t = TFE_AllocateHostTensor(ctx, datatype, dims, num_dims, status); 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);
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/eager/c_api_distributed_test.cc
ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); 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);
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
ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); 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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Dec 11 22:56:03 UTC 2020 - 9.1K bytes - Viewed (0)