-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to run the codes #9
Comments
Hi, "Config" in train_classifier is an object that contains the details of the experiment configuration. Do you mind elaborating on what you wish to run that's not (or insufficiently) covered in the README? |
Hey!
For example consider standard classifier.
There is a .json file and .py file, I am supposed to give the .json data to
the .py right? How do I give it? Should we give it manually or is there any
code which will directly take it from the .json file?
…On Tue, 30 Jun, 2020, 7:10 AM Cem Anil, ***@***.***> wrote:
Hi,
"Config" in train_classifier is an object that contains the details of the
experiment configuration.
Do you mind elaborating on what you wish to run that's not (or
insufficiently) covered in the README?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHMJFZOZXSPYRF4MTOSFJB3RZE7CLANCNFSM4OLN5XRA>
.
|
Hey!
It's kind of important for me because I am doing this project as a part of
my final year project. Please help me out.
Thank you
On Wed, 1 Jul, 2020, 11:27 AM naimesha pallapothu, <
pallapothunaimesha@gmail.com> wrote:
… Hey!
For example consider standard classifier.
There is a .json file and .py file, I am supposed to give the .json data
to the .py right? How do I give it? Should we give it manually or is there
any code which will directly take it from the .json file?
On Tue, 30 Jun, 2020, 7:10 AM Cem Anil, ***@***.***> wrote:
> Hi,
>
> "Config" in train_classifier is an object that contains the details of
> the experiment configuration.
>
> Do you mind elaborating on what you wish to run that's not (or
> insufficiently) covered in the README?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#9 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHMJFZOZXSPYRF4MTOSFJB3RZE7CLANCNFSM4OLN5XRA>
> .
>
|
It sounds like the "Tasks" section of the README contains what you need. Hope this helps. |
Hey!
Thanks for writing back but it's showing attribute error.
https://user-images.githubusercontent.com/30970597/86271805-2de65580-bbeb-11ea-970b-a7cc03b815d0.jpeg
this link shows an image of the error.
…On Wed, 1 Jul, 2020, 9:03 PM Cem Anil, ***@***.***> wrote:
It sounds like the "Tasks" section of the README contains what you need.
For example, you can run
"""
python ./lnets/tasks/classification/mains/train_classifier.py
./lnets/tasks/classification/configs/standard/fc_classification.json
"""
to train a classification network. The json file is directly processed.
Hope this helps.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHMJFZP4IRBSGCO7ICRTGNLRZNJN5ANCNFSM4OLN5XRA>
.
|
Are we supposed to change anything because it's showing file not found
this is the error
Averaged validation loss: -0.9927879944443703
Traceback (most recent call last):
File "./lnets/tasks/dualnets/mains/train_dual.py", line 176, in <module>
final_state = train_dualnet(dual_model, distrib_loaders, cfg)
File "./lnets/tasks/dualnets/mains/train_dual.py", line 151, in train_dualnet
model.load_state_dict(torch.load(best_model_path))
File "/home/naimesha/anaconda3/envs/lnets/lib/python3.7/site-packages/torch/serialization.py", line 584, in load
with _open_file_like(f, 'rb') as opened_file:
File "/home/naimesha/anaconda3/envs/lnets/lib/python3.7/site-packages/torch/serialization.py", line 234, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/home/naimesha/anaconda3/envs/lnets/lib/python3.7/site-packages/torch/serialization.py", line 215, in __init__
super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'out/wde/wasserstein_distance_estimation_absolute_value_experiment_MultiSphericalShell_and_MultiSphericalShell_aggmo_0.01_dual_fc_linear_bjorck_act_maxmin_depth_3_width_128_grouping_2_2020_07_01_21_34_29_992881/checkpoints/best/best_model.pt'
…On Wed, 1 Jul, 2020, 9:03 PM Cem Anil, ***@***.***> wrote:
It sounds like the "Tasks" section of the README contains what you need.
For example, you can run
"""
python ./lnets/tasks/classification/mains/train_classifier.py
./lnets/tasks/classification/configs/standard/fc_classification.json
"""
to train a classification network. The json file is directly processed.
Hope this helps.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHMJFZP4IRBSGCO7ICRTGNLRZNJN5ANCNFSM4OLN5XRA>
.
|
please reply for the error. thanks inadvance |
I see - It is possible that the attribute error you're getting is because you're using a different pytorch version. Which version are you using? The majority of the code should run without problems with the current version, but it might take a few minor modifications. |
I am using pytorch build - stable(1.5.1) with cuda 10.2 which version i install to make the code run?
And also what about the other error file not found or no such directory
…On Wed, 1 Jul, 2020, 10:45 PM Cem Anil, ***@***.***> wrote:
I see - It is possible that the attribute error you're getting is because
you're using a different pytorch version. Which version are you using?
The majority of the code should run without problems with the current
version, but it might take a few minor modifications.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHMJFZL2DAHWWTSLOHLID5LRZNVLNANCNFSM4OLN5XRA>
.
|
That might be it - the code is only tested rigorously on PyTorch version 0.4.. We are planning to upgrade the repo at some point in the future, but that might not be soon enough for your final year project. Perhaps you can try running things on pytorch 0.4? The other error seems to be due to the fact that the program is trying to load a model that hasn't been saved during training. In the config, you'll find logging.save_model field. Setting that to True should fix the problem. |
okay!! thank you so much for replying i am trying to run the code using
pytorch 0.4 and also will try to run the code using suggested changes.
…On Wed, 1 Jul 2020 at 23:23, Cem Anil ***@***.***> wrote:
That might be it - the code is only tested rigorously on PyTorch version
0.4.. We are planning to upgrade the repo at some point in the future, but
that might not be soon enough for your final year project. Perhaps you can
try running things on pytorch 0.4?
The other error seems to be due to the fact that the program is trying to
load a model that hasn't been saved during training. In the config, you'll
find logging.save_model field. Setting that to True should fix the problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHMJFZNUKXWMNLLBQWBMDKDRZNZ2NANCNFSM4OLN5XRA>
.
|
i tried running the code after changing the loggig.save_model to true but i am still seeing the error |
hey! |
hey! |
Hi, I cannot reproduce the error you're getting. In my setup, the best models get saved and are successfully loaded for validation. This is the command I ran: Here are the last few lines printed out by the program before it terminates: At epoch 8, the best model until that point gets saved. Could you confirm:
|
this is what i got Epoch 0: 16it [00:00, 28.46it/s] |
and also how do i get the graphs? |
Ah, the unsupported string error can be resolved by modifying {:04} to {}. The graphs should be saved automatically, (as long as you save the "visualize" flag is set to true, which is the default). |
You probably need to install the foolbox package. |
and also how do we get the test error value for classification experiment? |
Hmm, I expected the training script to automatically run validation. What are the last few lines the training script prints out? |
i got the validation acc and loss.log files |
and about the foolbox. foolbox is already installed. its showing there is no module named foolbox.adversial |
I see - I suspect this is due to the fact that the foolbox package changed since we released the code. Maybe you could try downgrading foolbox and see if this helps? |
what about this error? |
I'm guessing you encountered that when you tried to run "eval_adv_robustness.py" (line 79-80)? If that's the case, then I believe the problem might also be due to the foolbox version and downgrading might help. |
hey! |
Try adding more hidden layer sizes to the "layers field? |
hey can you briefly write what types of learning did we use for different experiments? |
can somebody please explain how to run the codes and what is config in train_classifier()
The text was updated successfully, but these errors were encountered: