Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ComputeGradient (0.2 sec)

  1. tensorflow/c/eager/gradients.h

                         TapeTensor>::GradientTape;
      // Returns whether the tape is persistent, i.e., whether the tape will hold
      // onto its internal state after a call to `ComputeGradient`.
      using GradientTape<AbstractTensorHandle, GradientFunction,
                         TapeTensor>::IsPersistent;
    
      // Adds this tensor to the list of watched tensors.
      //
    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)
  2. 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,
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
  3. tensorflow/c/experimental/gradients/custom_gradient_test.cc

      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},
                                              /*sources=*/inputs,
                                              /*output_gradients=*/{},
    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/experimental/gradients/grad_test_helper.cc

        AbstractContextPtr tape_ctx(new TapeContext(ctx, &tape, grad_registry));
        TF_RETURN_IF_ERROR(
            forward_model(tape_ctx.get(), inputs, absl::MakeSpan(temp_outputs)));
    
        TF_RETURN_IF_ERROR(tape.ComputeGradient(ctx, /*targets=*/temp_outputs,
                                                /*sources=*/inputs,
                                                /*output_gradients=*/{}, outputs));
        for (auto temp_output : temp_outputs) {
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  5. tensorflow/c/eager/gradients_test.cc

      tape.Watch(inputs[0]);
      AbstractTensorHandle* neg_output;
      TF_RETURN_IF_ERROR(ops::Neg(ctx, inputs[0], &neg_output, "Neg"));
      tape.RecordOperation(inputs, {neg_output}, nullptr, "Neg");
      return tape.ComputeGradient(ctx,
                                  /*targets=*/{neg_output},
                                  /*sources=*/inputs,
                                  /*output_gradients=*/{}, outputs);
    }
    
    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/gradients.cc

      std::vector<int64_t> ids(tensors.size());
      for (int i = 0; i < tensors.size(); i++) {
        ids[i] = ToId(tensors[i]);
      }
      return ids;
    }
    
    Status Tape::ComputeGradient(
        AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> targets,
        absl::Span<AbstractTensorHandle* const> sources,
        absl::Span<AbstractTensorHandle* const> output_gradients,
    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)
Back to top