MehdiAbbanaBennani / continual-learning-ogdplus

Code for "Generalisation Guarantees for Continual Learning with Orthogonal Gradient Descent" (ICML 2020 - Lifelong Learning Workshop)
MIT License
40 stars 6 forks source link

TypeError: optimizer_step() got an unexpected keyword argument 'epoch' #2

Closed henuykc closed 3 years ago

henuykc commented 3 years ago

Hi,I ran your code, but there was an error (the same as the title). My environment is python = 3.6.5, python = 1.5.0, python lighting = 1.0.8. Do you have any such problems. In addition, can you update requirement.txt so that the version of each moudle is consistent with your local version, instead of just the name of the moudle

MehdiAbbanaBennani commented 3 years ago

Hi there :)

Thanks for notifying me on the issues and for your suggest ! I have updated the requirements.txt file in order to reproduce the exact setup on my local environment.

My guess is that the error you encountered would be related to the pytorch-lighning version, I use pytorch_lightning==0.8.5, I recall the API changed recently.

Don't hesitate if you encounter other issues :) -- Mehdi

henuykc commented 3 years ago

Thank you!I have another problem. When I run the code, I find that there will be an error in line 204 of the ogd_core_new.py method under optimizer_step , which is about nonetype. When I debug the code, I find that this model has no gradient. How do you solve it?

MehdiAbbanaBennani commented 3 years ago

Cool ! I don't recall encountering this error, I am not sure about the issue, could you send me the detailed logs and the command line you run ?

Thanks !

henuykc commented 3 years ago

HAHAHA,after I reduced the version of pytorch_lighting to 0.8.5, there was no such problem.Thank you!

henuykc commented 3 years ago

I have another problem. When I run the CIFAR100 experiment, I didn't achieve the accuracy in the paper. After dividing 100 classes into 2 tasks, the result of my training is only [0.0,50.1953125]. I use lenet to train, each task training 50 epochs, other hyper parameter settings refer to your paper. Could you please send me the specific parameters of main.py in CIFAR100 experiment?

VeryThanks!

MehdiAbbanaBennani commented 3 years ago

Hi there ! Sorry for the late reply, the experiments I run were in the setting where the 100 classes were divided into 20 tasks. The exact hyperparamters can be generated with the script : https://github.com/MehdiAbbanaBennani/continual-learning-ogdplus/blob/master/scripts/gen_cl_prod.py Hope it helps :)

MehdiAbbanaBennani commented 3 years ago

Also, the detailed results of the grid search, with the accuracy trajectory and forgetting of each hyperparameter combination are available under this directory : https://github.com/MehdiAbbanaBennani/continual-learning-ogdplus/tree/master/results

MehdiAbbanaBennani commented 3 years ago

Let me know if if you have other issues :)

henuykc commented 3 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

Thank you for your reply! I'll try it later as you said.

                            yaohanju

                                ***@***.***

    签名由
    网易邮箱大师
    定制

On 4/4/2021 04:46,Mehdi Abbana ***@***.***> wrote: 

Let me know if if you have other issues :)

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.