I think you missed the point.
I would like to use the decoder part of a CVAE, however because it uses maxunpool2d i need to pass the indices into the decoder, however i would like to know:

is there another way of using maxunpool2d which doesn’t require using the indices?
if not, is there a way i can generate the indices tensors externally (I don’t think so)?
if not then what is the best way of mimicing maxpool2d/unpool2d? I have tried conv2d, avg2d and adaptive2d to no avail.