Closed atinesh-s closed 4 years ago
Hello @atinesh-s, thanks for bringing it up. This is something another user has noticed, and created a bugfix. I just merged the change - can you please get the new version and try again?
Hello @atinesh-s, thanks for bringing it up. This is something another user has noticed, and created a bugfix. I just merged the change - can you please get the new version and try again?
Hello @luizgh, With new code old bug has been resolved but I was getting another error in train.py at Line-305
while training signet
model
return val_acc.item(), val_loss.item(), val_forg_acc.item(), val_forg_loss.item()
AttributeError: 'float' object has no attribute 'item'
For the signet
model val_forg_acc
and val_forg_loss
will be nan
hence the error is obvious. Anyway, I changed that line as below and now code is running without any problem
return val_acc, val_loss, val_forg_acc, val_forg_loss
That makes sense - the lists val_losses
, etc. already get the only the value from the torch tensor (e.g. loss.item()
. Can you create a pull request with this change?
There is an open pull request by me to fix this issue.
There is an open pull request by me to fix this issue.
9
Hi @gonultasbu , Why not
return val_acc, val_loss, val_forg_acc, val_forg_loss
Instead of
if is_forg: return val_acc.item(), val_loss.item(), val_forg_acc.item(), val_forg_loss.item()
else : return val_acc.item(), val_loss.item(), val_forg_acc, val_forg_loss
that will be more cleaner I believe.
@atinesh-s it caused some issues with forgeries enabled, if my memory serves, been a while since I opened that PR.
@atinesh-s it caused some issues with forgeries enabled, if my memory serves, been a while since I opened that PR.
I have ran both model signet
and signet-f
its working fine
@atinesh-s if the code works with the following set of arguments:
python -m sigver.featurelearning.train --model signet --dataset-path <data.npz> --users [first last]\ --model signet --epochs 60 --forg --lamb 0.95 --logdir signet_f_lamb0.95
I guess that might also be a viable solution. I don't have the necessary resources to go back and verify.
Bear in mind that the PR also contains a fix for visdom.
@atinesh-s if the code works with the following set of arguments:
python -m sigver.featurelearning.train --model signet --dataset-path <data.npz> --users [first last]\ --model signet --epochs 60 --forg --lamb 0.95 --logdir signet_f_lamb0.95
I guess that might also be a viable solution. I don't have the necessary resources to go back and verify.
Bear in mind that the PR also contains a fix for visdom.
I have ran and tested code only on CEDAR Dataset
.
@gonultasbu - that has been a while, I completely forgot about these PRs, sorry about that!
For the fix with the return value (val_fog_loss.item), I prefer the solution from @atinesh-s , and just get rid of the ".item()" (since this is called above, before adding them to the lists). I merged that pull request
@gonultasbu Can you create a PR with just the visdom change?
@luizgh I will do it when I have time, also need to resolve some conflicts I assume.
@luizgh #15
Thanks @gonultasbu - I merged the PR
for cedar dataset , what is the range of --user ?? HELP me.
natures --save-path /home/dell/Documents/Prasad_AI/sign_similarity/sigver/changed_data Processing dataset Number of users: 55 Allocated x of shape: (2640, 170, 242)
It depends on your setup. If you want to use all users to learn features, use --users 0 55
I have preprocessed CEDAR Dataset as per instructions
But when I try to run
train.py
by the following commandI get error in
util.py