Problem with forward step in pytorch model
Traceback saying that:
* Epoch 1/20
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-24-4f0f868c6227&gt; in &lt;module&gt;()
      1 max_epochs = 20
      2 optim = torch.optim.Adam(model.parameters(), lr=1e-3)
----&gt; 3 train(model, optim, bce_loss, max_epochs, data_tr, data_val)

2 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
    725             result = self._slow_forward(*input, **kwargs)
    726         else:
--&gt; 727             result = self.forward(*input, **kwargs)
    728         for hook in itertools.chain(
    729                 _global_forward_hooks.values(),

TypeError: forward() takes 2 positional arguments but 3 were given 

But in train section of my net I did not pass more than two arguments(including self argument)
this is link to my code
Maybe problem not in train

Your model has sub-modules for which you (implicitly) call forward with more than one argument:
x = self.dec_conv3(self.unpool3(x, indices3))

Your unpool are simply MaxPool layers - they do not expect two input arguments.
