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

Error loading mnist ONNX model #150

Closed lauracanalini closed 4 years ago

lauracanalini commented 4 years ago

Hi, we are trying to use onnx to save the eddl models, so we tried to run 2_onnx_save_net_to_file.cpp and load the file saved with 3_onnx_import_net_from_file.cpp. During loading we get this error:

Ir_version = 6
Operator domain  = 
Operator version = 11
Producer_name: EDDL
Producer_version: 0.1
Domain: 
Model_version: 0
Net imported from ONNX succesfully
Generating Random Table
Selecting GPU device 0
EDDLL is running on GPU device 0, GeForce RTX 2080 Ti
CuBlas initialized on GPU device 0, GeForce RTX 2080 Ti
CuRand initialized on GPU device 0, GeForce RTX 2080 Ti
terminate called after throwing an instance of 'std::runtime_error'
  what():  Incorrect padding type (PoolDescriptor::PoolDescriptor)
Aborted (core dumped)

System information:

Does this also happen to you?

chavicoski commented 4 years ago

Can you share the code or the topology of the network?

lauracanalini commented 4 years ago

We're trying to use your examples, so the network is the one in eddl/examples/onnx/2_onnx_save_net_to_file.cpp.

// Define network
    layer in = Input({784});
    layer l = in;  // Aux var

     l = l=Reshape(l,{1,28,28});
     l=MaxPool(ReLu(BatchNormalization(Conv(l,32,{3,3},{1,1}))),{2,2});
     l=MaxPool(ReLu(BatchNormalization(Conv(l,64,{3,3},{1,1}))),{2,2});
     l=MaxPool(ReLu(BatchNormalization(Conv(l,128,{3,3},{1,1}))),{2,2});

     l=Flatten(l);

     l=Activation(Dense(l,256),"relu");

     l=Activation(Dense(l,128),"relu");

     layer out=Activation(Dense(l,num_classes),"softmax");

     // Net define input and output layers list
     model net=Model({in},{out});
prittt commented 4 years ago

Hey @chavicoski, is there any news from your side?

chavicoski commented 4 years ago

Not yet, we are working on it.

prittt commented 4 years ago

Ok, thank you. Let us know!

RParedesPalacios commented 4 years ago

Hi, Sorry for my previous examples. Effectively after git pull over master and re-build the new examples fails

chavicoski commented 4 years ago

The error is already fixed and uploaded to master. You can try to run it again