Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for FromBuffer (0.25 sec)

  1. tensorflow/cc/experimental/base/tests/tensor_test.cc

    // number of elements.
    TYPED_TEST(ConstructScalarTensorTest, ValidTensorAttributesAfterConstruction) {
      Status status;
      TF_DataType dtype = TypeParam::kDType;
      typename TypeParam::type value = 42;
      Tensor tensor = Tensor::FromBuffer(/*dtype=*/dtype, /*shape=*/{},
                                         /*data=*/&value,
                                         /*len=*/sizeof(value),
                                         /*deleter=*/[](void*, size_t) {}, &status);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 09:56:08 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. tensorflow/cc/experimental/base/tests/tensorhandle_test.cc

      ASSERT_TRUE(status.ok()) << status.message();
    
      TF_DataType dtype = TypeParam::kDType;
      typename TypeParam::type value = 42;
      Tensor original_tensor =
          Tensor::FromBuffer(/*dtype=*/dtype, /*shape=*/{},
                             /*data=*/&value,
                             /*len=*/sizeof(value),
                             /*deleter=*/[](void*, size_t) {}, &status);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 09:56:08 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  3. tensorflow/cc/experimental/base/public/tensor.h

      // a TFRT backed tensor.
      // TODO(bmzhao): Add benchmarks on overhead for this function; we can
      // consider using int64_t* + length rather than vector.
      static Tensor FromBuffer(TF_DataType dtype, const std::vector<int64_t>& shape,
                               void* data, size_t len, DeleterCallback deleter,
                               Status* status);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 28 20:10:33 UTC 2020
    - 6.3K bytes
    - Viewed (0)
Back to top