Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for GradientRegistry (0.3 sec)

  1. tensorflow/c/experimental/gradients/tape/tape_context.h

    #include "tensorflow/c/experimental/gradients/tape/tape_operation.h"
    
    namespace tensorflow {
    namespace gradients {
    class TapeContext : public AbstractContext {
     public:
      explicit TapeContext(AbstractContext*, Tape*, const GradientRegistry&);
      void Release() override;
      TapeOperation* CreateOperation() override;
      Status RegisterFunction(AbstractFunction*) override;
      Status RemoveFunction(const string& func) override;
      // For LLVM style RTTI.
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 23 23:12:39 GMT 2020
    - 1.6K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/gradients/tape/tape_operation.h

    #include "tensorflow/c/eager/gradients.h"
    
    namespace tensorflow {
    namespace gradients {
    class TapeOperation : public AbstractOperation {
     public:
      explicit TapeOperation(AbstractOperation*, Tape*, const GradientRegistry&);
      void Release() override;
      Status Reset(const char* op, const char* raw_device_name) override;
      const string& Name() const override;
      const string& DeviceName() const override;
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 23 23:12:39 GMT 2020
    - 3.7K bytes
    - Viewed (1)
  3. tensorflow/c/experimental/gradients/grad_test_helper.h

    void CheckTensorValue(AbstractTensorHandle* t, absl::Span<const float> manuals,
                          absl::Span<const int64_t> dims, double abs_error = 1e-2);
    
    Model BuildGradModel(Model forward, GradientRegistry registry);
    
    }  // namespace internal
    }  // namespace gradients
    }  // namespace tensorflow
    
    C
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Thu Jan 14 20:36:51 GMT 2021
    - 1.5K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/gradients/not_differentiable.h

                     absl::Span<AbstractTensorHandle*> grad_inputs) override;
    };
    // Shorthand for registry->Register(op, new NotDifferentiableGradientFunction)
    Status RegisterNotDifferentiable(GradientRegistry* registry, const string& op);
    }  // namespace gradients
    }  // namespace tensorflow
    
    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)
  5. tensorflow/c/experimental/gradients/not_differentiable.cc

        absl::Span<AbstractTensorHandle*> grad_inputs) {
      for (int i = 0; i < grad_inputs.size(); i++) {
        grad_inputs[i] = nullptr;
      }
      return OkStatus();
    }
    
    Status RegisterNotDifferentiable(GradientRegistry* registry, const string& op) {
      return registry->Register(op, [](const ForwardOperation& op) {
        return new NotDifferentiableGradientFunction;
      });
    }
    }  // namespace gradients
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Jun 15 01:15:58 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  6. tensorflow/c/eager/gradients_test.cc

        TF_SetTracingImplementation(std::get<0>(GetParam()), status.get());
        Status s = StatusFromTF_Status(status.get());
        CHECK_EQ(errors::OK, s.code()) << s.message();
      }
    };
    
    Status RegisterGradients(GradientRegistry* registry) {
      TF_RETURN_IF_ERROR(RegisterNotDifferentiable(registry, "CheckNumerics"));
      return absl::OkStatus();
    }
    
    TEST_P(CppGradients, TestSetAttrString) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7K bytes
    - Viewed (0)
  7. tensorflow/c/eager/gradients.h

    //   // More complex gradient functions can use inputs/attrs etc. from the
    //   // forward `op`.
    //   return new AddGradientFunction;
    // }
    //
    // Status RegisterGradients(GradientRegistry* registry) {
    //   return registry->Register("Add", AddRegisterer);
    // }
    class GradientFunction {
     public:
      virtual Status Compute(AbstractContext* ctx,
    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)
  8. tensorflow/c/experimental/gradients/tape/tape_context.cc

    #include "tensorflow/c/experimental/gradients/tape/tape_operation.h"
    
    namespace tensorflow {
    namespace gradients {
    TapeContext::TapeContext(AbstractContext* c, Tape* tape,
                             const GradientRegistry& registry)
        : AbstractContext(kTape), parent_ctx_(c), tape_(tape), registry_(registry) {
      // TODO(srbs): Make AbstractContext ref counted.
      // parent_ctx_->Ref();
    }
    void TapeContext::Release() {
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 23 23:12:39 GMT 2020
    - 1.7K bytes
    - Viewed (0)
  9. tensorflow/c/eager/gradients_internal.h

    // Make the call to `Tape::RecordOperation`.
    Status Execute(AbstractOperation*, AbstractContext*,
                   absl::Span<AbstractTensorHandle*> retvals, int* num_retvals,
                   ForwardOperation*, Tape*, const GradientRegistry&);
    
    }  // namespace internal
    }  // namespace gradients
    }  // namespace tensorflow
    
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Oct 24 11:27:35 GMT 2021
    - 4.2K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/gradients/grad_test_helper.cc

        } else {
          ASSERT_NEAR(manuals[j], danalytical[j], abs_error);
        }
      }
    
      TF_DeleteTensor(analytical_tensor);
      delete[] danalytical;
    }
    
    Model BuildGradModel(Model forward, GradientRegistry registry) {
      return [forward_model = std::move(forward),
              grad_registry = std::move(registry)](
                 AbstractContext* ctx,
                 absl::Span<AbstractTensorHandle* const> inputs,
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
Back to top