igel icon indicating copy to clipboard operation
igel copied to clipboard

CNN in pytorch

Open GouravWadhwa opened this issue 4 years ago • 4 comments

Hi @nidhaloff, I have added the feature for CNN in pytorch where the user enters random model. I also created a igel_cnn.yaml file for example. I have also tested it on my local machine and is able to clear all the tests. I have also tested the evaluate function locally.

GouravWadhwa avatar Aug 26 '21 22:08 GouravWadhwa

This PR solves the issue #76.

GouravWadhwa avatar Aug 27 '21 12:08 GouravWadhwa

Hi @nidhaloff, I added more functionality in the pytorch code and now following activation layers are supported [relu, sigmoid, leaky relu, prelu, tanh, elu, hardshrink, hard_sigmoid, hard_tanh, hard_swish, log_sigmoid, multi_head_attention, relu6, selu, celu, gelu, silu, mish, softplus, softshrink, softsign, tanshrink, threshold, softmax2d, softmax, softmin, adaptive_softmax,log_softmax] Further now I also added the following normalisation for users [batch_norm1d, batch_norm, batch_norm3d, lazy_batch_norm1d, lazy_batch_norm, lazy_batch_norm3d, sync_batch_norm, instance_norm1d, instance_norm, instance_norm3d] Further I also extended the support for types of pooling layer [max_pool, avg_pool, adaptive_max_pool, adaptive_avg_pool] Next, I also integrated the evaluate function in the Igel and also tested the functionality locally.

GouravWadhwa avatar Aug 27 '21 18:08 GouravWadhwa

@GouravWadhwa Hi, sorry I was very busy and somehow I didn't notice your PR. I will check it out asap. Can you add an example on how to use your pytorch cnn in the examples folder? and/or maybe describe a simple example in README. Thanks for your PR

nidhaloff avatar Sep 28 '21 09:09 nidhaloff

Hi @nidhaloff, I have added examples of using CNN. You just need to download the mnist_png dataset (From the site you gave the description earlier). It will store the results in model_results from where you can further evaluate it too.

GouravWadhwa avatar Sep 29 '21 10:09 GouravWadhwa