Skip to content

Instantly share code, notes, and snippets.

@maxfreu
maxfreu / bilinear.jl
Last active December 22, 2020 10:04
# An implementation for GPU based bilinear upsampling including its gradient
# The code is a translation from the following files:
# https://github.com/pytorch/pytorch/blob/master/caffe2/operators/upsample_op.cu
# https://github.com/pytorch/pytorch/blob/master/caffe2/core/common_gpu.h
# Forward and backward pass have been tested to produce the same output
# as pytorch - it works modulo bit noise.
# Open issues:
# 1) licensing?