Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for memcpy (0.17 sec)

  1. 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)
  2. tensorflow/c/experimental/gradients/grad_test_helper.cc

        ASSERT_EQ(num_elem_numerical, num_elem_analytical);
    
        float* dnumerical = new float[num_elem_numerical]{0};
        memcpy(&dnumerical[0], TF_TensorData(numerical_tensor),
               TF_TensorByteSize(numerical_tensor));
        float* danalytical = new float[num_elem_analytical]{0};
        memcpy(&danalytical[0], TF_TensorData(analytical_tensor),
               TF_TensorByteSize(analytical_tensor));
    
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  3. 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)
  4. tensorflow/c/c_api_experimental.cc

      *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) {
      const auto& debug_str = DebugString(func->record->fdef());
      *len = debug_str.size();
      char* ret = static_cast<char*>(malloc(*len + 1));
      memcpy(ret, debug_str.c_str(), *len + 1);
      return ret;
    }
    
    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)
  5. tensorflow/c/eager/c_api_remote_test.cc

      TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      float product[4] = {0};
      EXPECT_EQ(sizeof(product), TF_TensorByteSize(t));
      memcpy(&product[0], TF_TensorData(t), TF_TensorByteSize(t));
      TF_DeleteTensor(t);
      EXPECT_EQ(7, product[0]);
      EXPECT_EQ(10, product[1]);
      EXPECT_EQ(15, product[2]);
      EXPECT_EQ(22, product[3]);
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 12 00:14:22 GMT 2020
    - 5.4K bytes
    - Viewed (0)
  6. 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)
  7. tensorflow/c/eager/parallel_device/parallel_device_remote_test.cc

    See the License for the specific language governing permissions and
    limitations under the License.
    ==============================================================================*/
    
    #include <array>
    #include <memory>
    #include <string>
    
    #include "tensorflow/c/c_api.h"
    #include "tensorflow/c/c_api_experimental.h"
    #include "tensorflow/c/eager/c_api.h"
    #include "tensorflow/c/eager/c_api_experimental.h"
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 27 22:09:57 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  8. 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)
  9. tensorflow/c/eager/c_api_cluster_test.cc

      ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get());
      std::unique_ptr<float[]> actual_values(new float[expected_values.size()]);
      EXPECT_EQ(sizeof(float) * expected_values.size(), TF_TensorByteSize(t));
      memcpy(actual_values.get(), TF_TensorData(t), TF_TensorByteSize(t));
      TF_DeleteTensor(t);
    
      for (int i = 0; i < expected_values.size(); i++) {
        EXPECT_EQ(expected_values[i], actual_values[i])
    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)
  10. 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)
Back to top