- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for TF_DeleteTensor (0.1 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_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) -
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/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)