Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 80 for memcpy (0.16 sec)

  1. tensorflow/c/eager/gradient_checker.cc

      TF_RETURN_IF_ERROR(GetValue(theta, &theta_tensor));
    
      // Get number of elements and fill data.
      int num_elems = TF_TensorElementCount(theta_tensor);
      vector<float> theta_data(num_elems);
      memcpy(theta_data.data(), TF_TensorData(theta_tensor),
             TF_TensorByteSize(theta_tensor));
    
      // Initialize space for the numerical gradient.
      vector<float> dtheta_approx(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/c_api.cc

      status->status = s->session->PRunSetup(input_names, output_names,
                                             target_oper_names, &new_handle);
      if (status->status.ok()) {
        char* buf = new char[new_handle.size() + 1];
        memcpy(buf, new_handle.c_str(), new_handle.size() + 1);
        *handle = buf;
      }
    }
    
    void TF_PRun(TF_DeprecatedSession* s, const char* handle,
                 // Input tensors
    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/eager/c_api_distributed_test.cc

      ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status);
      TFE_DeleteTensorHandle(retvals[0]);
      float sum = 0;
      EXPECT_EQ(sizeof(sum), TF_TensorByteSize(t));
      memcpy(&sum, TF_TensorData(t), TF_TensorByteSize(t));
      TF_DeleteTensor(t);
      EXPECT_EQ(sum, 6.0);
    
      TFE_DeleteTensorHandle(h0);
      TFE_DeleteTensorHandle(h1);
      TFE_DeleteTensorHandle(h2);
    
    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)
  4. tensorflow/c/eager/c_api_test_util.h

                                               const int64_t* dims, int num_dims) {
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, datatype, dims, num_dims, status);
      memcpy(TF_TensorData(t), data, TF_TensorByteSize(t));
      TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status);
      CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TF_DeleteTensor(t);
      TF_DeleteStatus(status);
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Jul 17 23:43:59 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  5. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

    TensorHandlePtr VectorFloatTensorHandle(const std::vector<float>& v,
                                            TF_Status* status) {
      const int num_bytes = v.size() * sizeof(float);
      float* values = new float[v.size()];
      memcpy(values, v.data(), num_bytes);
      int64_t dims = v.size();
      std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor(
          TF_NewTensor(TF_FLOAT, &dims, 1 /* num_dims */, values, num_bytes,
    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)
  6. tensorflow/c/eager/c_api_test.cc

      EXPECT_EQ(TF_FLOAT, TFE_TensorHandleDataType(h));
    
      TF_Tensor* t = TFE_TensorHandleResolve(h, status.get());
      ASSERT_EQ(16, TF_TensorByteSize(t));
      float data[4] = {0};
      memcpy(&data[0], TF_TensorData(t), TF_TensorByteSize(t));
      EXPECT_EQ(1.0, data[0]);
      EXPECT_EQ(2.0, data[1]);
      EXPECT_EQ(3.0, data[2]);
      EXPECT_EQ(4.0, data[3]);
      TF_DeleteTensor(t);
      TFE_DeleteTensorHandle(h);
    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)
  7. tensorflow/c/eager/c_api_unified_experimental_test.cc

        ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
    
        memcpy(&result_data[0], TF_TensorData(f_t), TF_TensorByteSize(f_t));
    
        // Verify results for each output
        for (int j = 0; j < 4; j++) {
          ASSERT_EQ(result_data[j], expected_outputs[idx][j]);
        }
    
        TF_DeleteTensor(f_t);
      }
    
      // Free memory associated with add and MatMul outputs
      for (int idx = 0; idx < 3; ++idx) {
    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)
  8. tensorflow/c/experimental/filesystem/plugins/windows/windows_filesystem.cc

      ops->scheme = strdup(uri);
    }
    
    void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
      info->plugin_memory_allocate = plugin_memory_allocate;
      info->plugin_memory_free = plugin_memory_free;
      info->num_schemes = 2;
      info->ops = static_cast<TF_FilesystemPluginOps*>(
          plugin_memory_allocate(info->num_schemes * sizeof(info->ops[0])));
      ProvideFilesystemSupportFor(&info->ops[0], "");
    C++
    - Registered: Tue Apr 09 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:21:15 GMT 2022
    - 2.6K bytes
    - Viewed (0)
  9. tensorflow/c/eager/tfe_monitoring_internal.h

    #ifndef TENSORFLOW_C_EAGER_TFE_MONITORING_INTERNAL_H_
    #define TENSORFLOW_C_EAGER_TFE_MONITORING_INTERNAL_H_
    
    #include <functional>
    #include <memory>
    #include <string>
    
    #include "absl/memory/memory.h"
    #include "tensorflow/core/lib/monitoring/counter.h"
    #include "tensorflow/core/lib/monitoring/gauge.h"
    #include "tensorflow/core/lib/monitoring/sampler.h"
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 5.2K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api.h

        TFE_TensorHandle* h, TF_Status* status);
    
    // This function will block till the operation that produces `h` has
    // completed. The memory returned might alias the internal memory used by
    // TensorFlow. Hence, callers should not mutate this memory (for example by
    // modifying the memory region pointed to by TF_TensorData() on the returned
    // TF_Tensor).
    TF_CAPI_EXPORT extern TF_Tensor* TFE_TensorHandleResolve(TFE_TensorHandle* h,
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 27 21:07:00 GMT 2023
    - 22.8K bytes
    - Viewed (1)
Back to top