Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for initialize (0.24 sec)

  1. tensorflow/c/eager/gradient_checker.cc

             TF_TensorByteSize(theta_tensor));
    
      // Initialize space for the numerical gradient.
      vector<float> dtheta_approx(num_elems);
    
      // Get theta shape and store in theta_dims.
      int num_dims = TF_NumDims(theta_tensor);
      vector<int64_t> theta_dims(num_dims);
      GetDims(theta_tensor, theta_dims.data());
    
      // Initialize auxilary data structures.
      vector<float> thetaPlus_data(num_elems);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

        status_ = TF_NewStatus();
        filesystem_ = new TF_Filesystem;
        filesystem_->plugin_filesystem = nullptr;
        // Because different tests requires different setup for filesystem. We
        // initialize filesystem in each testcase.
      }
      void TearDown() override {
        TF_DeleteStatus(status_);
        if (filesystem_->plugin_filesystem != nullptr)
          tf_gcs_filesystem::Cleanup(filesystem_);
        delete filesystem_;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 12:04:23 GMT 2020
    - 24.9K bytes
    - Viewed (0)
  3. tensorflow/c/c_api_experimental.cc

      const tensorflow::OpRegistrationData* op_reg_data;
      status->status =
          tensorflow::OpRegistry::Global()->LookUp(node_def.op(), &op_reg_data);
      if (!status->status.ok()) return;
    
      // Initialize a input_tensor vector with `nullptr` values.
      std::vector<const Tensor*> input_tensors_vector(num_inputs, nullptr);
      // A vector to keep track of newly created `tf::Tensor` objects.
      std::vector<Tensor> all_input_tensors;
    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/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

      EXPECT_EQ(calls, 3);
      TF_EXPECT_OK(ReadCache(&cache4, want_filename, want_offset, want_n, &out));
      EXPECT_EQ(calls, 4);
    }
    
    TEST(RamFileBlockCacheTest, BlockAlignment) {
      // Initialize a 256-byte buffer.  This is the file underlying the reads we'll
      // do in this test.
      const size_t size = 256;
      std::vector<char> buf;
      buf.reserve(size);
      for (int i = 0; i < size; i++) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:57 GMT 2021
    - 23.2K bytes
    - Viewed (0)
  5. tensorflow/c/eager/c_api_distributed_test.cc

      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.
      TFE_ContextAsyncWait(ctx, status);
      EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
      // Pack 3 variable handles into one TFE_TensorHandle.
    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)
  6. tensorflow/c/checkpoint_reader.cc

        : reader_(nullptr),
          v2_reader_(nullptr),
          var_to_shape_map_(nullptr),
          var_to_data_type_map_(nullptr) {
      // Depending on whether this is a V2 ckpt, initializes "reader_" or
      // "v2_reader_".
      std::vector<string> v2_path;
      if (Env::Default()->GetMatchingPaths(MetaFilename(filename), &v2_path).ok() &&
          !v2_path.empty()) {
        v2_reader_.reset(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Aug 25 21:29:12 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_experimental_test.cc

      //
      // 1. Create a variable on `remote_device`, using `ctx_0`.
      TFE_TensorHandle* handle_0 =
          CreateVariable(ctx_0, 1.2, remote_device, /*variable_name=*/"var");
    
      // 2. Wait for `var` to be created and initialized on the worker.
      TF_Status* status = TF_NewStatus();
      TFE_ContextAsyncWait(ctx_0, status);
      EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TF_DeleteStatus(status);
    
    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)
  8. tensorflow/c/experimental/filesystem/modular_filesystem_test.cc

    // `::testing::TempDir()`, will use a RNG component and the test name. This
    // ensures that two consecutive runs are unlikely to clash.
    class ModularFileSystemTest : public ::testing::TestWithParam<std::string> {
     public:
      // Initializes `root_dir_` to a unique value made of `::testing::TempDir()`, a
      // static random value unique for all the tests in one invocation, and the
      // current test name.
      //
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:25:58 GMT 2022
    - 71K bytes
    - Viewed (0)
  9. tensorflow/c/eager/c_api_test.cc

      // 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.
      TF_Status* status = TF_NewStatus();
      TFE_ContextAsyncWait(ctx_0, status);
      EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TF_DeleteStatus(status);
    
    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)
  10. tensorflow/c/c_test_util.cc

      DeleteInputValues();
      inputs_.clear();
      for (const auto& p : inputs) {
        inputs_.emplace_back(TF_Output{p.first, 0});
        input_values_.emplace_back(p.second);
      }
    }
    
    void CSession::SetOutputs(std::initializer_list<TF_Operation*> outputs) {
      ResetOutputValues();
      outputs_.clear();
      for (TF_Operation* o : outputs) {
        outputs_.emplace_back(TF_Output{o, 0});
      }
      output_values_.resize(outputs_.size());
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
Back to top