- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for BoolTensor (0.06 sec)
-
tensorflow/c/c_test_util.h
#include "tensorflow/core/framework/types.pb.h" #include "tensorflow/core/platform/test.h" using ::tensorflow::string; typedef std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> unique_tensor_ptr; TF_Tensor* BoolTensor(int32_t v); // Create a tensor with values of type TF_INT8 provided by `values`. TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 09 01:06:53 UTC 2018 - 6K bytes - Viewed (0) -
tensorflow/c/c_test_util.cc
static void DoubleDeallocator(void* data, size_t, void* arg) { delete[] static_cast<double*>(data); } static void FloatDeallocator(void* data, size_t, void* arg) { delete[] static_cast<float*>(data); } TF_Tensor* BoolTensor(bool v) { const int num_bytes = sizeof(bool); bool* values = new bool[1]; values[0] = v; return TF_NewTensor(TF_BOOL, nullptr, 0, values, num_bytes, &BoolDeallocator, 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)