- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for TestScalarTensorHandle (0.18 sec)
-
tensorflow/c/eager/c_api_test_util.h
// Return a tensor handle containing a float scalar TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, float value); // Return a tensor handle containing a int scalar TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, int value); // Return a tensor handle containing a bool scalar TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, bool value); // Return a tensor handle containing a tstring scalar
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/gradients_test.cc
ASSERT_EQ(errors::OK, s.code()) << s.message(); ctx.reset(ctx_raw); } AbstractTensorHandlePtr t; { AbstractTensorHandle* x_raw = nullptr; absl::Status s = TestScalarTensorHandle<float, TF_FLOAT>(ctx.get(), 1.0f, &x_raw); ASSERT_EQ(errors::OK, s.code()) << s.message(); t.reset(x_raw); } AbstractOperationPtr check_numerics_op(ctx->CreateOperation());
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 7K bytes - Viewed (0) -
tensorflow/c/eager/c_api_debug_test.cc
TFE_Context* ctx = TFE_NewContext(opts, status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TFE_DeleteContextOptions(opts); TFE_TensorHandle* h = TestScalarTensorHandle(ctx, 1.0f); TFE_TensorDebugInfo* debug_info = TFE_TensorHandleTensorDebugInfo(h, status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); ASSERT_EQ(0, TFE_TensorDebugInfoOnDeviceNumDims(debug_info));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Apr 06 22:10:09 UTC 2020 - 2.3K bytes - Viewed (0) -
tensorflow/c/eager/gradient_checker_test.cc
{ AbstractTensorHandle* x_raw = nullptr; absl::Status s = TestScalarTensorHandle<float, TF_FLOAT>(ctx_.get(), 2.0f, &x_raw); ASSERT_EQ(errors::OK, s.code()) << s.message(); x.reset(x_raw); } AbstractTensorHandlePtr y; { AbstractTensorHandle* y_raw = nullptr; absl::Status s = TestScalarTensorHandle<float, TF_FLOAT>(ctx_.get(), 7.0f, &y_raw);
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/gradient_checker.cc
float epsilon = theta_data[i] == 0 ? 1e-4 : std::abs(theta_data[i] * 1e-4); AbstractTensorHandlePtr two_eps; { AbstractTensorHandle* two_eps_raw = nullptr; TF_RETURN_IF_ERROR(TestScalarTensorHandle<float, TF_FLOAT>( ctx, 2 * epsilon, &two_eps_raw)); two_eps.reset(two_eps_raw); } // Initialize theta[i] + epsilon. memcpy(thetaPlus_data.data(), TF_TensorData(theta_tensor),
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 7.3K bytes - Viewed (0)