Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for LookupOrCreateResource (0.32 sec)

  1. tensorflow/compiler/jit/xla_device_ops.cc

      // esoteric cases where the same tensor is used to initialize multiple
      // variables or the tensor is a constant this is safe, as future writes will
      // trigger copies).
      OP_REQUIRES_OK(context, LookupOrCreateResource<Var>(
                                  context, HandleFromInput(context, 0), &variable,
                                  [this, &value](Var** ptr) {
                                    *ptr = new Var(dtype_);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. tensorflow/c/kernels_experimental.cc

      tensorflow::core::RefCountPtr<tensorflow::Var> variable;
      const tensorflow::Tensor& value = cc_ctx->input(value_index);
      OP_REQUIRES_OK(cc_ctx, tensorflow::LookupOrCreateResource<tensorflow::Var>(
                                 cc_ctx, HandleFromInput(cc_ctx, input_index),
                                 &variable, [&value](tensorflow::Var** ptr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 23 06:12:29 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_launch_util.cc

    static absl::StatusOr<Var*> GetOrCreateResourceVar(
        OpKernelContext* ctx, const ResourceHandle& handle,
        const XlaCompiler::ResourceUpdate& write) {
      Var* variable = nullptr;
      TF_RETURN_IF_ERROR(
          LookupOrCreateResource<Var>(ctx, handle, &variable, [&write](Var** ptr) {
            *ptr = new Var(write.type);
            return absl::OkStatus();
          }));
      return variable;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 40.4K bytes
    - Viewed (0)
Back to top