- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 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_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_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) -
tensorflow/c/eager/parallel_device/parallel_device_lib.h
std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor( TF_NewTensor( datatype_enum, /*dims=*/nullptr, /*num_dims=*/0, device_value.release(), sizeof(DataType), [](void* data, size_t, void* arg) { delete reinterpret_cast<DataType*>(data); }, nullptr), TF_DeleteTensor);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 13.1K bytes - Viewed (0) -
tensorflow/c/eager/gradient_checker_test.cc
TF_TensorByteSize(numerical_tensor)); for (int j = 0; j < num_grad; j++) { ASSERT_NEAR(dnumerical[j], expected_grad[j], abs_error); } delete[] dnumerical; TF_DeleteTensor(numerical_tensor); } absl::Status MatMulModel(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, absl::Span<AbstractTensorHandle*> outputs) {
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/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]) << "Mismatch in expected values at (zero-based) index " << 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)