Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for Len (0.15 sec)

  1. tensorflow/c/c_api.cc

                                    size_t proto_len, TF_Status* status) {
      // shape.ParseFromArray takes an int as length, this function takes size_t,
      // make sure there is no information loss.
      if (proto_len > std::numeric_limits<int>::max()) {
        status->status = InvalidArgument(
            "proto_len (", proto_len,
            " bytes) is too large to be parsed by the protocol buffer library");
        return;
    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)
  2. tensorflow/c/c_api_experimental.cc

    }
    
    const char* TF_GraphDebugString(TF_Graph* graph, size_t* len) {
      tensorflow::mutex_lock c(graph->mu);
      const auto& debug_str = graph->graph.ToGraphDefDebug().DebugString();
      *len = debug_str.size();
      char* ret = static_cast<char*>(malloc(*len + 1));
      memcpy(ret, debug_str.c_str(), *len + 1);
      return ret;
    }
    
    char* TF_FunctionDebugString(TF_Function* func, size_t* len) {
    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)
  3. tensorflow/c/c_api_function.cc

        lib = g->graph.flib_def().ToProto();
      }
      const auto len = std::min(max_func, static_cast<int>(lib.function_size()));
      for (int i = 0; i < len; ++i) {
        TF_Function* func = new TF_Function();
        func->record = new tensorflow::FunctionRecord(lib.function(i), {}, false);
        funcs[i] = func;
      }
      status->status = absl::OkStatus();
      return len;
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 13.6K bytes
    - Viewed (2)
  4. tensorflow/c/eager/c_api_unified_experimental_test.cc

      // Copy Tensor data into an array.
      float result_data[4] = {0};
      memcpy(&result_data[0], TF_TensorData(result_tensor),
             TF_TensorByteSize(result_tensor));
    
      int data_len = 4;  // length of result_data
      for (int i = 0; i < data_len; i++) {
        EXPECT_EQ(result_data[i], 0);
      }
    
      TF_DeleteTensor(result_tensor);
      TF_DeleteAbstractTensor(result);
      TF_DeleteOutputList(o);
      TF_DeleteExecutionContext(ctx);
    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)
  5. tensorflow/c/experimental/grappler/grappler.cc

      const std::vector<std::string>& nodes =
          reinterpret_cast<const tensorflow::grappler::GrapplerItem*>(item)->fetch;
    
      const int len = std::min(num_values, static_cast<int>(nodes.size()));
      char* p = static_cast<char*>(storage);
      for (int index = 0; index < len; ++index) {
        const std::string& s = nodes[index];
        values[index] = p;
        lengths[index] = s.size();
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 15K bytes
    - Viewed (1)
  6. tensorflow/c/c_api_test.cc

      TF_TString tstr[1];
      TF_TString_Init(&tstr[0]);
      TF_TString_Copy(&tstr[0], test_string, sizeof(test_string) - 1);
    
      auto deallocator = [](void* data, size_t len, void* arg) {};
      unique_tensor_ptr t_in(TF_NewTensor(TF_STRING, nullptr, 0, &tstr[0],
                                          sizeof(tstr), deallocator, nullptr),
                             TF_DeleteTensor);
    
    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)
  7. tensorflow/c/eager/dlpack.cc

      }
    }
    
    // Wraps the deleter function of DLManagedTensor to match the function signature
    // TFE_NewTensorHandleFromDeviceMemory.
    void DeallocatorWrapperFunc(void* data, size_t len, void* dlmt_vptr) {
      TFE_CallDLManagedTensorDeleter(dlmt_vptr);
    }
    
    // Checks whether the stride array matches the layout of compact, row-majored
    // data.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  8. tensorflow/c/eager/c_api.cc

    TFE_ContextOptions* TFE_NewContextOptions() { return new TFE_ContextOptions; }
    
    void TFE_ContextOptionsSetConfig(TFE_ContextOptions* options, const void* proto,
                                     size_t proto_len, TF_Status* status) {
      TF_SetConfig(&options->session_options, proto, proto_len, status);
    }
    
    void TFE_ContextOptionsSetAsync(TFE_ContextOptions* options,
                                    unsigned char enable) {
      options->async = enable;
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  9. tensorflow/c/eager/c_api_experimental.cc

    }
    
    void TFE_InitializeLocalOnlyContext(TFE_Context* ctx, int keep_alive_secs,
                                        const void* proto, size_t proto_len,
                                        TF_Status* status) {
      tensorflow::ServerDef server_def;
      if (!server_def.ParseFromArray(proto, proto_len)) {
        status->status = tensorflow::errors::InvalidArgument(
            "Invalid tensorflow.ServerDef protocol buffer");
        return;
      }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 11 23:52:39 GMT 2024
    - 35.9K bytes
    - Viewed (3)
Back to top