- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for grads (0.16 sec)
-
tensorflow/c/eager/tape.h
} Gradient* in_grad = in_grads[grad_index]; if (in_grad != nullptr) { // ComputeGradient steals a reference vspace_.MarkAsResult(in_grad); } used_in_grads.push_back(in_grad); } } return tape->ComputeGradient(vspace_, targets, sources, sources_that_are_targets, used_in_grads, out_grads);
C - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Apr 02 12:40:29 GMT 2024 - 47.2K bytes - Viewed (1) -
tensorflow/c/experimental/gradients/custom_gradient_test.cc
public: Status Compute(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> grad_outputs, absl::Span<AbstractTensorHandle*> grad_inputs) override { CHECK_EQ(grad_outputs.size(), 1); CHECK_EQ(grad_inputs.size(), 1); grad_inputs[0] = grad_outputs[0]; if (grad_inputs[0]) { grad_inputs[0]->Ref(); } return absl::OkStatus(); } }; // Computes: //
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/c_api_function_test.cc
std::vector<std::pair<string, string>> grads = GetGradDefs(gdef); ASSERT_EQ(2, grads.size()); ASSERT_EQ("FooFunc1", grads[0].first); ASSERT_EQ("MyGrad", grads[0].second); ASSERT_EQ("FooFunc2", grads[1].first); ASSERT_EQ("MyGrad", grads[1].second); TF_DeleteFunction(func1); TF_DeleteFunction(func2); TF_DeleteFunction(grad_func); }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Jul 20 22:08:54 GMT 2023 - 63.6K bytes - Viewed (6) -
tensorflow/c/experimental/gradients/array_grad_test.cc
==============================================================================*/ #include "tensorflow/c/experimental/gradients/array_grad.h" #include "tensorflow/c/eager/c_api_test_util.h" #include "tensorflow/c/eager/c_api_unified_experimental_internal.h" #include "tensorflow/c/eager/unified_api_testutil.h" #include "tensorflow/c/experimental/gradients/grad_test_helper.h" #include "tensorflow/c/experimental/gradients/tape/tape_context.h"
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/gradients.cc
} } TF_RETURN_IF_ERROR(GradientTape::ComputeGradient( vspace, target_tensor_ids, source_tensor_ids, sources_that_are_targets, output_gradients, result, /*build_default_zeros_grads*/ false)); return absl::OkStatus(); } // Helper functions which delegate to `AbstractOperation`, update // the state of the ForwardOperation and call the tape as appropriate.
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 19.3K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/nn_grad.cc
absl::Span<AbstractTensorHandle* const> grad_outputs, absl::Span<AbstractTensorHandle*> grad_inputs) override { // Grad for Softmax Input TF_RETURN_IF_ERROR(BroadcastMul( ctx, grad_outputs[0], forward_outputs_[1], grad_inputs.subspan(0, 1))); // upstream_grad * local softmax grad // Grad for labels is null grad_inputs[1] = nullptr; return absl::OkStatus(); }
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5.7K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/math_grad.cc
absl::Span<AbstractTensorHandle* const> grad_outputs, absl::Span<AbstractTensorHandle*> grad_inputs) override { // TODO(b/161805092): Support broadcasting. DCHECK(grad_outputs[0]); grad_inputs[0] = grad_outputs[0]; grad_inputs[1] = grad_outputs[0]; grad_inputs[0]->Ref(); grad_inputs[1]->Ref(); return absl::OkStatus(); }
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 15.2K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/array_grad.cc
auto grad_input = grad_outputs[i]; // TODO(srbs): Should we add a copy contructor to AbstractTensorHandle // that takes care of this similar to `Tensor`? if (grad_input) { grad_input->Ref(); } grad_inputs[i] = grad_input; } return absl::OkStatus(); } ~IdentityNGradientFunction() override {} }; } // namespace
C++ - Registered: Tue Apr 09 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 1.6K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/nn_grad_test.cc
limitations under the License. ==============================================================================*/ #include "tensorflow/c/experimental/gradients/nn_grad.h" #include "tensorflow/c/eager/c_api_test_util.h" #include "tensorflow/c/eager/unified_api_testutil.h" #include "tensorflow/c/experimental/gradients/grad_test_helper.h" #include "tensorflow/c/experimental/gradients/tape/tape_context.h" #include "tensorflow/c/experimental/ops/nn_ops.h"
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/grad_test_helper.cc
&numerical_grad_raw); ASSERT_EQ(errors::OK, s.code()) << s.message(); numerical_grad.reset(numerical_grad_raw); } TF_Tensor* numerical_tensor; s = GetValue(numerical_grad.get(), &numerical_tensor); ASSERT_EQ(errors::OK, s.code()) << s.message(); auto num_elem_numerical = TF_TensorElementCount(numerical_tensor);
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5K bytes - Viewed (0)