Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for clear (0.16 sec)

  1. tensorflow/c/eager/c_api_unified_experimental.cc

    void TF_OutputListSetNumOutputs(TF_OutputList* o, int num_outputs,
                                    TF_Status* s) {
      unwrap(o)->expected_num_outputs = num_outputs;
      unwrap(o)->outputs.clear();
      unwrap(o)->outputs.resize(num_outputs);
    }
    int TF_OutputListNumOutputs(TF_OutputList* o) {
      return unwrap(o)->outputs.size();
    }
    TF_AbstractTensor* TF_OutputListGet(TF_OutputList* o, int i) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. tensorflow/c/c_api.cc

        if (!mutation_warning.empty()) {
          // TODO(b/74949947): turn this back into an error status
          LOG(WARNING) << mutation_warning;
          session->graph->sessions[session].clear();
        }
    
        const auto num_nodes = graph.num_node_ids();
        if (session->last_num_graph_nodes < num_nodes) {
          // TODO(nolivia): check this on a subset of the graph instead of all of
          // it.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

          RemoveFile_Locked(std::string(it->first.first));
        }
      }
    }
    
    void RamFileBlockCache::Flush() {
      absl::MutexLock lock(&mu_);
      block_map_.clear();
      lru_list_.clear();
      lra_list_.clear();
      cache_size_ = 0;
    }
    
    void RamFileBlockCache::RemoveFile(const std::string& filename) {
      absl::MutexLock lock(&mu_);
      RemoveFile_Locked(filename);
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 16 01:39:09 GMT 2020
    - 11.1K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/gradients/tape/tape_operation.cc

      // parent_op->Unref();
    }
    Status TapeOperation::Reset(const char* op, const char* raw_device_name) {
      forward_op_.op_name = op;
      forward_op_.attrs.Reset(op);
      forward_op_.inputs.clear();
      forward_op_.outputs.clear();
      return parent_op_->Reset(op, raw_device_name);
    }
    const string& TapeOperation::Name() const { return parent_op_->Name(); }
    const string& TapeOperation::DeviceName() const {
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache_test.cc

      cache2.LookupOrCompute("a", &value, compute_func, &status);
      TF_EXPECT_OK(status.status);
      EXPECT_EQ(value, 5);
      EXPECT_EQ(num_compute_calls, 6);
    }
    
    TEST(ExpiringLRUCacheTest, Clear) {
      tf_gcs_filesystem::ExpiringLRUCache<int> cache(1, 4);
      cache.Insert("a", 1);
      cache.Insert("b", 2);
      cache.Insert("c", 3);
      cache.Insert("d", 4);
      int value = 0;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 09 19:31:22 GMT 2020
    - 7.1K bytes
    - Viewed (0)
  6. 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});
    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)
  7. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

    namespace tensorflow {
    namespace {
    
    Status ReadCache(tf_gcs_filesystem::RamFileBlockCache* cache,
                     const string& filename, size_t offset, size_t n,
                     std::vector<char>* out) {
      out->clear();
      out->resize(n, 0);
      TF_Status status;
      auto bytes_transferred =
          cache->Read(filename, offset, n, out->data(), &status);
      if (bytes_transferred >= 0) {
        EXPECT_LE(bytes_transferred, n);
    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)
  8. tensorflow/c/eager/c_api_test.cc

      TFE_ContextAddFunctionDef(ctx, function_def.data(), function_def.size(),
                                status);
      CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
      for (bool clear_cache : {true, false, true}) {
        if (clear_cache) {
          TFE_ContextClearCaches(ctx);
        }
        TFE_TensorHandle* m = TestMatrixTensorHandle(ctx);
        TFE_TensorHandle* retval[1] = {nullptr};
        int num_retvals = 1;
    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)
  9. tensorflow/c/eager/c_api_unified_experimental_test.cc

      // Execute.
      TF_ExecuteOperation(op, 2, inputs, o, status.get());
      ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get());
    
      // Clean up operation and inputs.
      TF_DeleteAbstractOp(op);
      TF_DeleteAbstractTensor(at);
    
      // Verify the results.
      ASSERT_EQ(1, TF_OutputListNumOutputs(o));
      TF_AbstractTensor* result = TF_OutputListGet(o, 0);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 19 21:44:52 GMT 2023
    - 39.1K bytes
    - Viewed (0)
  10. tensorflow/c/c_api_test.cc

      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
      EXPECT_EQ(0, num_dims);
      TF_GraphGetTensorShape(graph, three_out_0, returned_dims, num_dims, s);
      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
    
      // Clean up
      TF_DeleteGraph(graph);
      TF_DeleteStatus(s);
    }
    
    TEST(CAPI, Graph) {
      TF_Status* s = TF_NewStatus();
      TF_Graph* graph = TF_NewGraph();
    
      // Make a placeholder operation.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
Back to top