Hi all,
I am trying to implement a U-NET. I stumbled upon a problem using MaxUnpool2d. The solution is not unique, hence, I get different solutions each time I run it.
I reproduced the error here:
import torch
import torch.nn as nn

x = torch.load("x.pt")
indices = torch.load("indices.pt")

unpool = nn.MaxUnpool2d(kernel_size=(3, 3), stride=(1, 1), padding=(0, 0))


###############################################

output_1 = unpool(x,indices)
output_2 = unpool(x,indices)


############################################
print("Sum of Output_1:")
print(sum(sum(sum(sum(output_1)))))
print("---------------------")
print("Sum of Output_2:")
print(sum(sum(sum(sum(output_2)))))


GitHub repository:
https://github.com/fridolinvii/MaxUnpool2d.git 1
I’d be thankful for anyone, who has an idea, what might be wrong.
Edit: My problem is, that output_1 is different from  output_2