Skip to content

it is possible to change conv2d's padding to zero? #15

@cxmscb

Description

@cxmscb

After changing the padding of conv2d to zero, error occurred below:

File "fashion_mnist.py", line 59, in
args.alpha_grad, args.scatter_grad, l1_proj=args.l1_proj)
File "/home/songcb/convex_adversarial-master/examples/trainer.py", line 22, in train_robust
scatter_grad=scatter_grad)
File "/home/songcb/.local/lib/python3.6/site-packages/convex_adversarial-0.2-py3.6.egg/convex_adversarial/dual.py", line 182, in robust_loss
File "/home/songcb/.local/lib/python3.6/site-packages/convex_adversarial-0.2-py3.6.egg/convex_adversarial/dual.py", line 56, in init
File "/home/songcb/.local/lib/python3.6/site-packages/convex_adversarial-0.2-py3.6.egg/convex_adversarial/affine.py", line 46, in call
File "/home/songcb/.local/lib/python3.6/site-packages/convex_adversarial-0.2-py3.6.egg/convex_adversarial/affine.py", line 66, in forward
File "/home/songcb/.local/lib/python3.6/site-packages/torch/nn/functional.py", line 837, in linear
output = input.matmul(weight.t())
File "/home/songcb/.local/lib/python3.6/site-packages/torch/autograd/variable.py", line 386, in matmul
return torch.matmul(self, other)
File "/home/songcb/.local/lib/python3.6/site-packages/torch/functional.py", line 173, in matmul
return torch.mm(tensor1, tensor2)
RuntimeError: size mismatch at /pytorch/torch/lib/THC/generic/THCTensorMathBlas.cu:243

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions