- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TF_AllocateTensor (0.09 sec)
-
tensorflow/c/eager/c_api_test_util.cc
TFE_OpSetAttrType(op, "dtype", TF_FLOAT); TFE_OpAddInput(op, var_handle, status); // Convert 'value' to a TF_Tensor then a TFE_TensorHandle. std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> t( TF_AllocateTensor(TF_FLOAT, nullptr, 0, sizeof(value)), TF_DeleteTensor); memcpy(TF_TensorData(t.get()), &value, TF_TensorByteSize(t.get())); std::unique_ptr<TFE_TensorHandle, decltype(&TFE_DeleteTensorHandle)>
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_test.cc
TF_DeleteStatus(status); } TEST(CAPI, TestBitcastFrom_Reshape) { int64_t dims[] = {2, 3}; TF_Tensor* a = TF_AllocateTensor(TF_UINT64, dims, 2, 6 * TF_DataTypeSize(TF_UINT64)); TF_Tensor* b = TF_AllocateTensor(TF_UINT64, nullptr, 0, TF_DataTypeSize(TF_UINT64)); EXPECT_NE(a, nullptr); EXPECT_NE(b, nullptr); EXPECT_EQ(6, TF_TensorElementCount(a));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
/*in_flight_nodes_limit=*/0); TFE_ContextSetExecutorForThread(ctx, executor); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_Tensor* t = TF_AllocateTensor(TF_INT32, nullptr, 0, 1 * sizeof(tensorflow::int32)); *reinterpret_cast<tensorflow::int32*>(TF_TensorData(t)) = 42; TFE_TensorHandle* h = TFE_NewTensorHandle(t, status);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 03:14:26 UTC 2023 - 31.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test.cc
std::vector<int64_t> dims(4, 1); TFE_Op* op = TFE_NewOp(ctx, "AvgPool", status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_Tensor* tensor = TF_AllocateTensor(TF_FLOAT, dims.data(), dims.size(), sizeof(float)); float tensor_data[] = {1}; memcpy(TF_TensorData(tensor), tensor_data, TF_TensorByteSize(tensor));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 20:50:20 UTC 2023 - 94.6K bytes - Viewed (0)