Thanks for providing your code for FastFlow.
I try to train it but I got the following error:
Traceback (most recent call last):
File "./FastFlow/FrEIA/framework/graph_inn.py", line 300, in forward
mod_out = node.module(mod_in, rev=rev, jac=jac)
File "~/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "./FastFlow/FrEIA/modules/all_in_one_block.py", line 248, in forward
a1 = self.subnet(x1c)
File "~/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "~/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/modules/container.py", line 119, in forward
input = module(input)
File "~/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "~/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 399, in forward
return self._conv_forward(input, self.weight, self.bias)
File "~/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 395, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
TypeError: conv2d(): argument 'padding' (position 5) must be tuple of ints, not str
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "main.py", line 29, in <module>
model = train(train_loader, test_loader)
File "./FastFlow/train.py", line 86, in train
z, log_jac_det = model(inputs)
File "~/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "./FastFlow/model.py", line 133, in forward
z, log_jac_det = self.nf(feat_s)
File "~/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "./FastFlow/FrEIA/framework/graph_inn.py", line 302, in forward
raise RuntimeError(f"{node} encountered an error.") from e
RuntimeError: Node 'conv_high_res_0': [(24, 24, 768)] -> AllInOneBlock -> [(24, 24, 768)] encountered an error.
I'm not sure what's the error here. I assumed it was the padding-problem (which was a problem between version of torch before 1.8)
I'm using torch 1.8 but I cannot find any padding-problems.