Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for gradient_function (0.22 sec)

  1. tensorflow/c/eager/gradients.cc

    Status TapeVSpace::CallBackwardFunction(
        const string& op_type, GradientFunction* gradient_function,
        const std::vector<int64_t>& unneeded_gradients,
        gtl::ArraySlice<AbstractTensorHandle*> output_gradients,
        absl::Span<AbstractTensorHandle*> result) const {
      if (gradient_function == nullptr) {
        return errors::InvalidArgument(
            "Provided null gradient_function for '", op_type, "'.\n",
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  2. tensorflow/c/eager/gradients.h

    using GradientFunctionFactory =
        std::function<GradientFunction*(const ForwardOperation& op)>;
    
    // Map from op name to a `GradientFunctionFactory`.
    class GradientRegistry {
     public:
      Status Register(const string& op,
                      GradientFunctionFactory gradient_function_factory);
      Status Lookup(const ForwardOperation& op,
                    std::unique_ptr<GradientFunction>* gradient_function) const;
    
     private:
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Sep 26 10:27:05 GMT 2022
    - 6.9K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/gradients/custom_gradient_test.cc

      tape.Watch(inputs[0]);  // Watch x.
      AbstractTensorHandle* exp_output;
      TF_RETURN_IF_ERROR(ops::Exp(ctx, inputs[0], &exp_output, "Exp"));
      std::unique_ptr<GradientFunction> gradient_function(
          new PassThroughGradientFunction);
      tape.RecordOperation(inputs, {exp_output}, gradient_function.release());
      TF_RETURN_IF_ERROR(tape.ComputeGradient(ctx,
                                              /*targets*/ {exp_output},
    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)
  4. tensorflow/c/eager/gradients_test.cc

                          {x.get()}, absl::MakeSpan(outputs),
                          /*use_function=*/!std::get<2>(GetParam()));
      ASSERT_EQ(error::INVALID_ARGUMENT, s.code());
      ASSERT_EQ(
          "Provided null gradient_function for 'Neg'.\nIf the intent is to treat "
          "this op as non-differentiable consider using RegisterNotDifferentiable "
          "or NotDifferentiableGradientFunction.",
          s.message());
      ASSERT_EQ(nullptr, outputs[0]);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/gradients/math_grad.h

    namespace tensorflow {
    namespace gradients {
    
    GradientFunction* AddRegisterer(const ForwardOperation& op);
    GradientFunction* ExpRegisterer(const ForwardOperation& op);
    GradientFunction* MatMulRegisterer(const ForwardOperation& op);
    GradientFunction* SqrtRegisterer(const ForwardOperation& op);
    GradientFunction* NegRegisterer(const ForwardOperation& op);
    GradientFunction* SubRegisterer(const ForwardOperation& op);
    C
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Thu Dec 03 22:28:48 GMT 2020
    - 1.5K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/gradients/nn_grad.h

    #include "tensorflow/c/eager/gradients.h"
    
    namespace tensorflow {
    namespace gradients {
    GradientFunction* ReluRegisterer(const ForwardOperation& op);
    GradientFunction* SparseSoftmaxCrossEntropyWithLogitsRegisterer(
        const ForwardOperation& op);
    GradientFunction* BiasAddRegisterer(const ForwardOperation& op);
    }  // namespace gradients
    }  // namespace tensorflow
    
    C
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Thu Dec 03 22:28:48 GMT 2020
    - 1.2K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/gradients/nn_grad.cc

    };
    
    }  // namespace
    
    GradientFunction* ReluRegisterer(const ForwardOperation& op) {
      return new ReluGradientFunction(op.outputs);
    }
    
    GradientFunction* SparseSoftmaxCrossEntropyWithLogitsRegisterer(
        const ForwardOperation& op) {
      return new SparseSoftmaxCrossEntropyWithLogitsGradientFunction(op.outputs);
    }
    
    GradientFunction* BiasAddRegisterer(const ForwardOperation& op) {
    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)
  8. tensorflow/c/experimental/gradients/math_grad.cc

    }
    
    GradientFunction* SqrtRegisterer(const ForwardOperation& op) {
      return new SqrtGradientFunction(op.outputs[0]);
    }
    
    GradientFunction* NegRegisterer(const ForwardOperation& op) {
      return new NegGradientFunction;
    }
    
    GradientFunction* SubRegisterer(const ForwardOperation& op) {
      return new SubGradientFunction;
    }
    
    GradientFunction* MulRegisterer(const ForwardOperation& op) {
      return new MulGradientFunction(op.inputs);
    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)
  9. tensorflow/c/experimental/gradients/array_grad.cc

    #include "tensorflow/c/experimental/gradients/array_grad.h"
    
    #include "tensorflow/c/eager/abstract_context.h"
    
    namespace tensorflow {
    namespace gradients {
    namespace {
    class IdentityNGradientFunction : public GradientFunction {
     public:
      Status Compute(AbstractContext* ctx,
                     absl::Span<AbstractTensorHandle* const> grad_outputs,
                     absl::Span<AbstractTensorHandle*> grad_inputs) override {
    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)
  10. tensorflow/c/experimental/gradients/not_differentiable.h

    #include "tensorflow/c/eager/gradients.h"
    
    namespace tensorflow {
    namespace gradients {
    // Ignores `grad_outputs` and sets all entries in grad_inputs to nullptr.
    class NotDifferentiableGradientFunction : public GradientFunction {
      Status Compute(AbstractContext* ctx,
                     absl::Span<AbstractTensorHandle* const> grad_outputs,
                     absl::Span<AbstractTensorHandle*> grad_inputs) override;
    };
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Thu Dec 03 22:28:48 GMT 2020
    - 1.5K bytes
    - Viewed (0)
Back to top