Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for variables (0.33 sec)

  1. tensorflow/c/eager/c_api_distributed_test.cc

      const char task2_name[] = "/job:localhost/replica:0/task:2/device:CPU:0";
    
      // Create one variable per task.
      TFE_TensorHandle* h0 = TestVariable(ctx, 1.0, task1_name);
      TFE_TensorHandle* h1 = TestVariable(ctx, 2.0, task2_name);
      TFE_TensorHandle* h2 = TestVariable(ctx, 3.0, task0_name);
    
      // Add a sync point to make sure that variables have been initialized
      // before the function execution starts.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  2. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

      // Create a variable handle (uninitialized to start) placed on the parallel
      // device.
      std::function<void(Variable*)> variable_deleter = [&](Variable* to_delete) {
        to_delete->Destroy(context, status.get());
        ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
        delete to_delete;
      };
      std::unique_ptr<Variable, decltype(variable_deleter)> variable(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
  3. tensorflow/c/c_api_experimental.cc

        return nullptr;
      }
      const auto& m = reader->GetVariableToDataTypeMap();
      for (auto it = m.begin(); it != m.end(); ++it)
        reader->variable_list.push_back(it->first);
      std::sort(reader->variable_list.begin(), reader->variable_list.end());
      return reader;
    }
    
    void TF_DeleteCheckpointReader(TF_CheckpointReader* reader) { delete reader; }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  4. tensorflow/c/eager/c_api_cluster_test.cc

      TFE_ExecutorWaitForAllPendingNodes(executor, status);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TFE_DeleteExecutor(executor);
      TF_DeleteStatus(status);
    }
    
    // Read the value of variable `var` and save it into `out_value`.
    void ReadVariable(TFE_Context* ctx, TFE_TensorHandle* var,
                      TFE_TensorHandle** out_value) {
      TF_Status* status = TF_NewStatus();
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Apr 14 10:03:59 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  5. tensorflow/c/eager/c_api_test.cc

                              remote_device) != device_names.end());
      }
    
      // Create a variable using `ctx_0`.
      // Read the variable using `ctx_1`. This read should succeed.
      // 1. Create a variable on `remote_device`, using `ctx_0`.
      TFE_TensorHandle* handle_0 =
          CreateVariable(ctx_0, 1.2, remote_device, /*variable_name=*/"var2");
    
      // 2. Wait for `var2` to be created and initialized on the worker.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
  6. tensorflow/c/experimental/next_pluggable_device/c_api.cc

      tensorflow::Var* variable;
      cc_status = tensorflow::LookupResource(cc_ctx, handle, &variable);
      return new TF_VariableInfo(index, handle.name(), variable);
    }
    
    void TF_LockVariableInfos(TF_VariableInfo** vars, int num_vars,
                              TF_Status* status) {
      std::vector<tensorflow::VariableInfo*> variable_ptrs;
      variable_ptrs.reserve(num_vars);
      for (int i = 0; i < num_vars; ++i) {
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jan 09 00:52:04 GMT 2024
    - 13.9K bytes
    - Viewed (1)
  7. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

          ExecutionState::kIdle;
      // Tells the worker thread that there is new work.
      tensorflow::condition_variable start_execute_;
      // The worker thread notifies that work has finished.
      tensorflow::condition_variable finished_execute_;
      // Notifies a StartExecute that the previous Join has finished.
      tensorflow::condition_variable finished_join_;
    
      // Temporary state between `StartExecute` and `Join`.
      //
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  8. tensorflow/c/eager/c_api_experimental_test.cc

      }
    
      // Create a variable using `ctx_0`.
      // Replace worker1 using a new worker, and update the contexts.
      // Read the variable using `ctx_1`. This read should succeed.
      //
      // 1. Create a variable on `remote_device`, using `ctx_0`.
      TFE_TensorHandle* handle_0 =
          CreateVariable(ctx_0, 1.2, remote_device, /*variable_name=*/"var");
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  9. tensorflow/c/eager/custom_device_test.cc

                            &arrived, &executed, status.get());
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
    
      // Create a variable handle placed on the custom device.
      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> op(
          TFE_NewOp(context.get(), "VarHandleOp", status.get()), TFE_DeleteOp);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 27 23:39:24 GMT 2020
    - 18.4K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api_test_util.cc

    TFE_TensorHandle* CreateVarHandle(TFE_Context* ctx,
                                      const tensorflow::string& device_name,
                                      const tensorflow::string& variable_name) {
      TF_Status* status = TF_NewStatus();
      // Create the variable handle.
      TFE_Op* op = TFE_NewOp(ctx, "VarHandleOp", status);
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_OpSetAttrType(op, "dtype", TF_FLOAT);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 23.5K bytes
    - Viewed (2)
Back to top