- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for RunModel (0.99 sec)
-
tensorflow/c/eager/unified_api_testutil.h
// being equivalent to the following python code. // // if use_function: // outputs = tf.function(model)(inputs) // else: // outputs = model(inputs) Status RunModel(Model model, AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, absl::Span<AbstractTensorHandle*> outputs, bool use_function);
C - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Feb 27 13:57:45 GMT 2024 - 4K bytes - Viewed (0) -
tensorflow/c/eager/unified_api_test.cc
{ AbstractTensorHandle* x_raw = nullptr; Status s = TestScalarTensorHandle<float, TF_FLOAT>(ctx.get(), 2.0f, &x_raw); ASSERT_EQ(errors::OK, s.code()) << s.message(); x.reset(x_raw); } Status s = RunModel(TestScalarShape, ctx.get(), /*inputs=*/{x.get()}, /*outputs=*/{}, /*use_function=*/UseFunction()); ASSERT_EQ(errors::OK, s.code()) << s.message(); }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Feb 27 13:57:45 GMT 2024 - 6.7K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/nn_grad_test.cc
immediate_execution_ctx_.get(), 0.0f, &Y_raw); ASSERT_EQ(errors::OK, status_.code()) << status_.message(); Y.reset(Y_raw); } std::vector<AbstractTensorHandle*> outputs(1); status_ = RunModel(ReluGradModel, immediate_execution_ctx_.get(), {Y.get()}, absl::MakeSpan(outputs), UseFunction()); ASSERT_EQ(errors::OK, status_.code()) << status_.message();
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 8.3K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/array_grad_test.cc
ASSERT_EQ(errors::OK, status_.code()) << status_.message(); auto IdentityNGradModel = BuildGradModel(IdentityNModel, registry_); std::vector<AbstractTensorHandle*> outputs(2); status_ = RunModel(IdentityNGradModel, immediate_execution_ctx_.get(), {x1.get(), x2.get()}, absl::MakeSpan(outputs), UseFunction()); ASSERT_EQ(errors::OK, status_.code()) << status_.message(); EXPECT_EQ(outputs[0], nullptr);
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5K bytes - Viewed (0) -
tensorflow/c/eager/unified_api_testutil.cc
input->DataType(), shape, &handle)); params->emplace_back(handle); } return absl::OkStatus(); } // Runs `model` maybe wrapped in a function. Status RunModel(Model model, AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, absl::Span<AbstractTensorHandle*> outputs, bool use_function) { if (use_function) {
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Feb 27 13:57:45 GMT 2024 - 5.7K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/custom_gradient_test.cc
x.reset(x_raw); } // Pseudo-code: // // tape.watch(x) // y = exp(x) // outputs = tape.gradient(y, x) std::vector<AbstractTensorHandle*> outputs(1); Status s = RunModel(ExpWithPassThroughGrad, ctx.get(), {x.get()}, absl::MakeSpan(outputs), /*use_function=*/!std::get<2>(GetParam())); ASSERT_EQ(errors::OK, s.code()) << s.message();
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 4.8K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/grad_test_helper.cc
absl::Span<AbstractTensorHandle* const> inputs, bool use_function, double abs_error) { auto num_inputs = inputs.size(); std::vector<AbstractTensorHandle*> outputs(num_inputs); auto s = RunModel(grad_model, ctx, inputs, absl::MakeSpan(outputs), /*use_function=*/use_function); ASSERT_EQ(errors::OK, s.code()) << s.message(); for (int i = 0; i < num_inputs; ++i) { if (!outputs[i]) continue;
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5K bytes - Viewed (0) -
tensorflow/c/eager/gradient_checker.cc
absl::Span<AbstractTensorHandle*> outputs, bool use_function) { AbstractTensorHandle* model_outputs[1]; // Run the model. TF_RETURN_IF_ERROR( RunModel(forward, ctx, inputs, model_outputs, use_function)); AbstractTensorHandlePtr model_out(model_outputs[0]); TF_Tensor* model_out_tensor; TF_RETURN_IF_ERROR(GetValue(model_out.get(), &model_out_tensor));
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 7.3K bytes - Viewed (0) -
tensorflow/c/eager/gradients_test.cc
ASSERT_EQ(errors::OK, s.code()) << s.message(); x.reset(x_raw); } std::vector<AbstractTensorHandle*> outputs(1); Status s = RunModel(RecordOperationWithNullGradientFunctionModel, ctx.get(), {x.get()}, absl::MakeSpan(outputs), /*use_function=*/!std::get<2>(GetParam())); ASSERT_EQ(error::INVALID_ARGUMENT, s.code());
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 7K bytes - Viewed (0)