Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for RoundDim (0.25 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.cc

    };
    
    // Rounds the dimension based on the ceil mode.
    int RoundDim(float dim, bool ceil_mode) {
      if (ceil_mode) {
        return std::ceil(dim);
      }
      return std::floor(dim);
    }
    
    // For H or W, calculate the output dimension for average pool.
    int CalculateSpatialOutDim(int in, int k, int p, int s, bool ceil_mode) {
      const float effective_size = in - k + (2 * p);
      int out = RoundDim(effective_size / (float)s, ceil_mode) + 1;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 9.2K bytes
    - Viewed (0)
Back to top