- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TF_NewTensor (0.23 sec)
-
tensorflow/c/c_test_util.cc
int32_t* values = new int32_t[1]; values[0] = v; return TF_NewTensor(TF_INT32, nullptr, 0, values, num_bytes, &Int32Deallocator, nullptr); } TF_Tensor* DoubleTensor(double v) { const int num_bytes = sizeof(double); double* values = new double[1]; values[0] = v; return TF_NewTensor(TF_DOUBLE, nullptr, 0, values, num_bytes, &DoubleDeallocator, nullptr); }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Oct 15 03:16:52 UTC 2021 - 17.8K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib.h
++device_index) { auto device_value = absl::make_unique<DataType>(); *device_value = values[device_index]; std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor( TF_NewTensor( datatype_enum, /*dims=*/nullptr, /*num_dims=*/0, device_value.release(), sizeof(DataType), [](void* data, size_t, void* arg) { delete reinterpret_cast<DataType*>(data);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 13.1K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
reinterpret_cast<float*>(tensorflow::cpu_allocator()->AllocateRaw( TF_TensorDefaultAlignment(), num_bytes)); int64_t dims[] = {2, 3}; bool deallocator_called = false; TF_Tensor* t = TF_NewTensor(TF_FLOAT, dims, 2, values, num_bytes, &Deallocator, &deallocator_called); EXPECT_FALSE(deallocator_called); EXPECT_EQ(TF_FLOAT, TF_TensorType(t)); EXPECT_EQ(2, TF_NumDims(t));
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/c_api.cc
dims.reserve(shape.dims()); for (int i = 0; i < shape.dims(); ++i) { dims.push_back(shape.dim_size(i)); nelems *= shape.dim_size(i); } CHECK_EQ(nelems, 0); return TF_NewTensor( dtype, reinterpret_cast<const int64_t*>(dims.data()), shape.dims(), reinterpret_cast<void*>(&empty), 0, [](void*, size_t, void*) {}, nullptr); } static void TF_Run_Helper(
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 102.3K bytes - Viewed (0)