Looking for pytorch method alternative in flux

i am looking for pytorch’s interpolate(out, scale_factor=2, mode=“nearest”) torch.nn.functional.interpolate — PyTorch 1.12 documentation
method alternative in Flux

1 Like

reference: compatibility with Flux · Issue #396 · JuliaMath/Interpolations.jl · GitHub

probably you are looking for NNlib.upsample_nearest and Flux.Upsample for a corresponding layer

this one does not work on Chain

does it has the same effect as pytorch interpolate nearest ?

i have tested, it works as expected thank you very much!