Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for BoolTensor (0.18 sec)

  1. 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);
    
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 09 01:06:53 GMT 2018
    - 6K bytes
    - Viewed (0)
  2. 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);
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
Back to top