Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for is_initialized (0.17 sec)

  1. tensorflow/compiler/jit/xla_device_ops.cc

                                    *(*ptr)->tensor() = value;
                                    (*ptr)->is_initialized = true;
                                    return absl::OkStatus();
                                  }));
      mutex_lock ml(*variable->mu());
      OP_REQUIRES(
          context,
          !variable->is_initialized || variable->tensor()->dtype() == dtype_,
          errors::InvalidArgument(
    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/compiler/mlir/tensorflow/transforms/mark_initialized_variables.cc

      auto* var_ptr = GetVariableFromSession(var_handle_op, device_name, mgr);
      if (!var_ptr) return false;
      auto* tensor = var_ptr->tensor();
      bool is_initialized = tensor && tensor->IsInitialized();
      var_ptr->Unref();
      return is_initialized;
    }
    
    LogicalResult MarkInitializedVariablesInFunction(func::FuncOp function,
                                                     tensorflow::Session* session) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 13 19:14:56 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/mark_initialized_variables.h

    #include "tensorflow/core/public/session.h"
    
    namespace mlir {
    namespace tf_saved_model {
    // Marks all variables in 'function' whether they are initialized
    // in 'session' or not by setting an attribute named 'is_initialized'
    // on each variable op with value true/false based on variable is initialized
    // in the session or not.
    // If 'session' is NULL the function is no-op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 19 00:13:50 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/xla_launch_util.cc

                << " at input index: " << actual_input_index << " with shape "
                << write.shape.DebugString() << "; variable tensor has shape: "
                << var->tensor()->shape().DebugString();
    
        if (var->is_initialized && var->tensor()->dtype() != write.type) {
          return errors::Internal("Mismatched type in variable write");
        }
    
        TF_ASSIGN_OR_RETURN(
            Tensor output_tensor,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  5. tensorflow/c/kernels_experimental.cc

                                   *(*ptr)->tensor() = value;
                                   (*ptr)->is_initialized = true;
                                   return absl::OkStatus();
                                 }));
      tensorflow::mutex_lock ml(*variable->mu());
    
      if (validate_shape) {
        OP_REQUIRES(cc_ctx,
                    (!variable->is_initialized ||
                     variable->tensor()->shape().IsSameSize(value.shape())),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 23 06:12:29 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/xla_launch_util_gpu_test.cc

                          const gtl::ArraySlice<T> data) {
        Tensor* init_var_value = CreateDeviceTensor<T>(shape, data);
        Var* var = new Var(DataTypeToEnum<T>::v());
        *var->tensor() = *init_var_value;
        var->is_initialized = true;
    
        return var;
      }
    
      // Creates a Variable, adds it to the resource manager and also adds it as one
      // of the inputs in the context_
      template <typename T>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 10K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/get_compiler_ir.cc

          arg.kind = XlaCompiler::Argument::kResource;
          arg.resource_kind = XlaResource::kVariable;
          arg.definition_stack_trace = variable.definition_stack_trace();
          TF_RET_CHECK(variable.var() && variable.var()->is_initialized);
          const Tensor* value = variable.var()->tensor();
          arg.type = value->dtype();
          arg.shape = value->shape();
          arg.initialized = true;
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 06:59:07 UTC 2024
    - 19K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/xla_launch_util_test.cc

                          const gtl::ArraySlice<T> data) {
        Tensor* init_var_value = CreateDeviceTensor<T>(shape, data);
        Var* var = new Var(DataTypeToEnum<T>::v());
        *var->tensor() = *init_var_value;
        var->is_initialized = true;
    
        return var;
      }
    
      // Creates a Variable, adds it to the resource manager and also adds it as one
      // of the inputs in the context_
      template <typename T>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model_mark_initialized_variables.mlir

      // CHECK: "tf.VarHandleOp"
      // CHECK-SAME: shared_name = "var1"
      // CHECK-SAME: _is_initialized = true
      // CHECK: "tf.VarHandleOp"
      // CHECK-SAME: shared_name = "var2"
      // CHECK-SAME: _is_initialized = true
      // CHECK: "tf.VarHandleOp"
      // CHECK-SAME: shared_name = "var3"
      // CHECK-SAME: _is_initialized = false
    
      // INVALID-NOT: _is_initialized
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/tests/promote_resources_to_args_functions.mlir

      }
    
      // One resource, one read. _is_initialized is true, should be promoted.
      // CHECK-LABEL: func @read(%arg0: tensor<f32> {tf.resource_name = "x"}) -> tensor<f32>
      func.func @read() -> tensor<f32> {
        // CHECK-NOT: "tf.VarHandleOp"
        // CHECK-NOT: "tf.ReadVariableOp"
        // CHECK: return %arg0
        %1 = "tf.VarHandleOp"() {container = "", shared_name = "x", _is_initialized = true} : () -> tensor<!tf_type.resource<tensor<f32>>>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 24 05:47:26 UTC 2022
    - 1.7K bytes
    - Viewed (0)
Back to top