Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for FillNumericTensorBuffer (0.18 sec)

  1. tensorflow/c/experimental/saved_model/core/test_utils.cc

      for (int i = 0; i < shape.size(); ++i) {
        CHECK_EQ(tensor->Dim(i), shape[i]);
      }
      FillNumericTensorBuffer(tensor->Type(), tensor->NumElements(), tensor->Data(),
                              value);
      ImmediateTensorHandlePtr handle(ctx->CreateLocalHandle(tensor.get()));
      CHECK_NE(handle.get(), nullptr);
      return handle;
    }
    
    void FillNumericTensorBuffer(DataType dtype, size_t num_elements, void* buffer,
                                 int8_t value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Sep 08 20:13:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/saved_model/core/test_utils.h

                                                int8_t value);
    
    // Fills a numeric tensor's buffer with `value`.
    // dtype must be any integer dtype, float or double.
    void FillNumericTensorBuffer(DataType dtype, size_t num_elements, void* buffer,
                                 int8_t value);
    
    // Checks the underlying data is equal for the buffers for two numeric tensors.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 3.5K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/saved_model/core/constant_loading_test.cc

      TensorShape shape(std::get<1>(test_params));
      bool tensorproto_use_tensor_content = std::get<2>(test_params);
    
      // Construct a Tensor with the given dtype + shape
      Tensor expected(dtype, shape);
      testing::FillNumericTensorBuffer(expected.dtype(), expected.NumElements(),
                                       expected.data(), 42);
    
      // Serialize it to a Tensorproto
      TensorProto proto;
      if (tensorproto_use_tensor_content) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 4.2K bytes
    - Viewed (0)
Back to top