- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 244 for memcpy (0.12 sec)
-
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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test_util.cc
TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, float value) { float data[] = {value}; TF_Status* status = TF_NewStatus(); TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, nullptr, 0, status); memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t)); TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_DeleteTensor(t);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
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; }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 29.5K bytes - Viewed (0) -
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) {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 39.1K bytes - Viewed (0) -
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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 23.4K bytes - Viewed (0) -
tensorflow/c/eager/gradient_checker_test.cc
ASSERT_EQ(errors::OK, s.code()) << s.message(); auto num_elem_numerical = TF_TensorElementCount(numerical_tensor); ASSERT_EQ(num_elem_numerical, num_grad); float* dnumerical = new float[num_elem_numerical]{0}; memcpy(&dnumerical[0], TF_TensorData(numerical_tensor), TF_TensorByteSize(numerical_tensor)); for (int j = 0; j < num_grad; j++) { ASSERT_NEAR(dnumerical[j], expected_grad[j], abs_error); }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 6.5K bytes - Viewed (0) -
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
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 102.3K bytes - Viewed (0) -
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])
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.2K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
} TF_Tensor* FloatTensor2x2(const float* values) { const int64_t dims[2] = {2, 2}; TF_Tensor* t = TF_AllocateTensor(TF_FLOAT, dims, 2, sizeof(float) * 4); memcpy(TF_TensorData(t), values, sizeof(float) * 4); return t; } TF_Operation* FloatConst2x2(TF_Graph* graph, TF_Status* s, const float* values, const char* name) {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0) -
cmd/metrics-v3-system-memory.go
var ( memTotalMD = NewGaugeMD(memTotal, "Total memory on the node") memUsedMD = NewGaugeMD(memUsed, "Used memory on the node") memUsedPercMD = NewGaugeMD(memUsedPerc, "Used memory percentage on the node") memFreeMD = NewGaugeMD(memFree, "Free memory on the node") memBuffersMD = NewGaugeMD(memBuffers, "Buffers memory on the node") memCacheMD = NewGaugeMD(memCache, "Cache memory on the node")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Apr 17 05:10:25 UTC 2024 - 2.2K bytes - Viewed (0)