- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for TF_DeleteTensor (0.08 sec)
-
tensorflow/c/eager/c_api_test_util.cc
TFE_OpAddInput(op, var_handle, status); // Convert 'value' to a TF_Tensor then a TFE_TensorHandle. std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> t( TF_AllocateTensor(TF_FLOAT, nullptr, 0, sizeof(value)), TF_DeleteTensor); memcpy(TF_TensorData(t.get()), &value, TF_TensorByteSize(t.get())); std::unique_ptr<TFE_TensorHandle, decltype(&TFE_DeleteTensorHandle)>
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/gradient_checker.cc
TF_TensorByteSize(grad_tensor)); TF_DeleteTensor(grad_tensor); dtheta_approx[i] = grad_data[0]; } // Populate *numerical_grad with the data from dtheta_approx. TF_RETURN_IF_ERROR(TestTensorHandleWithDims<float, TF_FLOAT>( ctx, dtheta_approx.data(), theta_dims.data(), num_dims, numerical_grad)); TF_DeleteTensor(theta_tensor); return absl::OkStatus(); }
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/c_api_test.cc
1, nullptr, 0, s); ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s); EXPECT_EQ(3, *(static_cast<int32*>(TF_TensorData(fetchValues1[0])))); TF_DeleteTensor(feedValues1[0]); TF_DeleteTensor(fetchValues1[0]); // Feed B and fetch (A + 2) + B. TF_Output feeds2[] = {TF_Output{b, 0}}; TF_Output fetches2[] = {TF_Output{plusB, 0}}; TF_Tensor* feedValues2[] = {Int32Tensor(4)};
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_test.cc
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); } TEST(CAPI, TensorHandleCopyBetweenDevices) { TensorHandleCopyBetweenDevices(false); }
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_test_util.cc
const char* name) { unique_tensor_ptr tensor(BoolTensor(v), TF_DeleteTensor); return Const(tensor.get(), graph, s, name); } TF_Operation* ScalarConst(int32_t v, TF_Graph* graph, TF_Status* s, const char* name) { unique_tensor_ptr tensor(Int32Tensor(v), TF_DeleteTensor); return Const(tensor.get(), graph, s, name); }
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_remote_test.cc
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); TFE_DeleteTensorHandle(h1_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/c_api_experimental_test.cc
/*expected_shape*/ make_shape({1, 1, 6})); TFE_DeleteOp(fill_op); fill_op = nullptr; TFE_DeleteTensorHandle(scalar); TF_DeleteTensor(scalarTensor); TF_DeleteTensor(tensor_1X1X6); TF_DeleteTensor(tensor_1X6); } TEST(CAPI_EXPERIMENTAL, LibraryPluggableDeviceLoadFunctions) { // TODO(penpornk): Enable this test on Windows. #if !defined(PLATFORM_WINDOWS)
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Jan 17 22:27:52 UTC 2023 - 13.1K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
EXPECT_EQ(0, memcmp(m_float, resolved_data, 4 * sizeof(float))); TF_DeleteTensor(resolved); TFE_DeleteTensorHandle(copy_aliased); // Note that this will delete copy. TFE_DeleteTensorHandle(on_host); } TF_DeleteDeviceList(devices); TF_DeleteTensor(m_data); TFE_DeleteTensorHandle(m); TFE_DeleteContext(ctx); TF_DeleteStatus(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
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 TEST_P(UnifiedCAPI, TestBasicEagerMatMul) {
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/c_test.c
// just nice to know that it compiles. void compute(void* kernel, TF_OpKernelContext* ctx) { TF_Tensor* input; TF_Status* s = TF_NewStatus(); TF_GetInput(ctx, 0, &input, s); TF_DeleteTensor(input); TF_DeleteStatus(s); } // Exercises tensorflow's C API. int main(int argc, char** argv) { TF_InitMain(argv[0], &argc, &argv); struct TF_StringStream* s = TF_GetLocalTempDirectories();
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Apr 24 20:50:35 UTC 2024 - 2.8K bytes - Viewed (0)