deephealthproject / eddl

European Distributed Deep Learning (EDDL) library. A general-purpose library initially developed to cover deep learning needs in healthcare use cases within the DeepHealth project.
https://deephealthproject.github.io/eddl/
MIT License
34 stars 10 forks source link

Resnet examples fail with "padding asymmetry is not allowed" #281

Closed simleo closed 3 years ago

simleo commented 3 years ago

The cifar_resnet, cifar_resnet_da_bn and cifar_resnet50_da_bn fail with the following error:

$ ./cifar_resnet_da_bn --testing --cpu
Downloading cifar
cifar_trX.bin ✓
cifar_trY.bin ✓
cifar_tsX.bin ✓
cifar_tsY.bin ✓
terminate called after throwing an instance of 'AsymmetricPaddingException'
  what():  In layer : Padding asymmetry detected (top=0, bottom=1, left=0, right=1). The padding asymmetry is not allowed in a Conv layer, we suggest you to use an explicit padding layer before this layer to fix the asymmetry.
Aborted (core dumped)

Tested with EDDL v0.1a.

chavicoski commented 3 years ago

The EDDL now raises an error when a Conv layer has asymmetric padding. The way to solve it is to add a Pad layer before the Conv layer to add the padding explicitly. I did it and now is working. Thanks!