Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for CreateOperation (0.2 sec)

  1. tensorflow/c/experimental/gradients/tape/tape_context.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.
      static bool classof(const AbstractContext* ptr) {
    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_context.cc

      delete this;
    }
    TapeContext::~TapeContext() {
      // TODO(srbs): Make AbstractContext ref counted.
      // parent_ctx_->Unref();
    }
    TapeOperation* TapeContext::CreateOperation() {
      return new TapeOperation(parent_ctx_->CreateOperation(), tape_, registry_);
    }
    Status TapeContext::RegisterFunction(AbstractFunction* f) {
      return parent_ctx_->RegisterFunction(f);
    }
    Status TapeContext::RemoveFunction(const string& func) {
    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)
  3. tensorflow/c/eager/abstract_context.h

      // The returned object can be used for setting operation's attributes,
      // adding inputs and finally executing (immediately or lazily as in tracing)
      // it in this context.
      virtual AbstractOperation* CreateOperation() = 0;
    
      // Registers a function with this context, after this the function is
      // available to be called/referenced by its name in this context.
      virtual Status RegisterFunction(AbstractFunction*) = 0;
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Oct 24 11:16:58 GMT 2021
    - 3K bytes
    - Viewed (0)
  4. tensorflow/c/eager/gradients.cc

      return static_cast<int64_t>(reinterpret_cast<uintptr_t>(t));
    }
    
    Status ZerosLike(AbstractContext* ctx, AbstractTensorHandle* t,
                     AbstractTensorHandle** result) {
      AbstractOperationPtr op(ctx->CreateOperation());
      TF_RETURN_IF_ERROR(op->Reset("ZerosLike", /*raw_device_name=*/nullptr));
      if (isa<tracing::TracingOperation>(op.get())) {
        TF_RETURN_IF_ERROR(dyn_cast<tracing::TracingOperation>(op.get())->SetOpName(
    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)
  5. tensorflow/c/eager/gradients_test.cc

        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());
      ForwardOperation forward_op;
      Status s = Reset(check_numerics_op.get(), "CheckNumerics",
                       /*raw_device_name=*/nullptr, &forward_op);
      ASSERT_EQ(errors::OK, s.code()) << s.message();
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7K bytes
    - Viewed (0)
  6. tensorflow/c/eager/c_api_unified_experimental.cc

      return wrap(t);
    }
    
    void TF_DeleteExecutionContext(TF_ExecutionContext* c) { unwrap(c)->Release(); }
    
    TF_AbstractOp* TF_NewAbstractOp(TF_ExecutionContext* c) {
      return wrap((unwrap(c)->CreateOperation()));
    }
    
    void TF_DeleteAbstractOp(TF_AbstractOp* op) { unwrap(op)->Release(); }
    
    void TF_DeleteAbstractTensor(TF_AbstractTensor* t) { unwrap(t)->Unref(); }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_unified_experimental_graph.cc

      void Release() override { delete this; }
    
      TracingOperation* CreateOperation() override {
        return new GraphOperation(graph_.get());
      }
    
      Status AddParameter(DataType dtype, const PartialTensorShape& shape,
                          TracingTensorHandle** output) override {
        TracingOperationPtr operation(CreateOperation());
        TF_RETURN_IF_ERROR(operation->Reset("Placeholder", nullptr));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 15.4K bytes
    - Viewed (1)
  8. tensorflow/c/eager/unified_api_testutil.cc

          scoped_func.reset(func);
          for (auto output : output_list.outputs) {
            output->Unref();
          }
          TF_RETURN_IF_ERROR(ctx->RegisterFunction(func));
        }
    
        AbstractOperationPtr fn_op(ctx->CreateOperation());
        TF_RETURN_IF_ERROR(fn_op->Reset(fn_name, /*raw_device_name=*/nullptr));
        for (auto input : inputs) {
          TF_RETURN_IF_ERROR(fn_op->AddInput(input));
        }
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  9. tensorflow/c/eager/immediate_execution_context.h

          ImmediateExecutionTensorHandle* handle, const char* device_name,
          Status* status) = 0;
    
      // Create an operation to perform op execution
      ImmediateExecutionOperation* CreateOperation() override = 0;
    
      // Returns whether the runtime is backed by TFRT or the legacy TF Eager
      // Runtime. This is necessary to decouple runtime-dependent
      // code that is layered on top of the runtime.
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 06 08:34:00 GMT 2023
    - 12.3K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api.cc

    }
    
    TFE_Op* TFE_NewOp(TFE_Context* ctx, const char* op_or_function_name,
                      TF_Status* status) {
      tensorflow::ImmediateExecutionOperation* new_op =
          tensorflow::unwrap(ctx)->CreateOperation();
      status->status = new_op->Reset(op_or_function_name, nullptr);
      if (!status->status.ok()) {
        new_op->Release();
        new_op = nullptr;
      }
      return tensorflow::wrap(new_op);
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
Back to top