Home / Class/ get_cubic_upsample_coefficients Class — pytorch Architecture

get_cubic_upsample_coefficients Class — pytorch Architecture

Architecture documentation for the get_cubic_upsample_coefficients class in UpSample.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/UpSample.h lines 408–422

template <typename scalar_t>
static inline void get_cubic_upsample_coefficients(
    scalar_t coeffs[4],
    scalar_t t) {
  scalar_t A = -0.75;

  scalar_t x1 = t;
  coeffs[0] = cubic_convolution2<scalar_t>(x1 + 1.0, A);
  coeffs[1] = cubic_convolution1<scalar_t>(x1, A);

  // opposite coefficients
  scalar_t x2 = 1.0 - t;
  coeffs[2] = cubic_convolution1<scalar_t>(x2, A);
  coeffs[3] = cubic_convolution2<scalar_t>(x2 + 1.0, A);
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free