Skip to content
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

update_vis_plot function called with incorrect # of arguments #21

Open
FarjadAhmed opened this issue May 17, 2023 · 0 comments
Open

update_vis_plot function called with incorrect # of arguments #21

FarjadAhmed opened this issue May 17, 2023 · 0 comments

Comments

@FarjadAhmed
Copy link

I am running the train.py with the following cmd command:
python train.py --dataset VOC --dataset_root /home/alyoussef/repulsionLoss/repulsion_loss_ssd/data/VOCdevkit/ --basenet vgg16_reducedfc.pth --batch_size 32 --start_iter 10 --num_workers 0 --cuda False --lr 0.01 --momentum 0.9 --weight_decay 0.0005 --gamma 0.1 --visdom True --save_folder weights/

Error:
File "train.py", line 164, in train
update_vis_plot(epoch, loc_loss, repul_loss, conf_loss, epoch_plot, None,'append', epoch_size)
TypeError: update_vis_plot() takes from 6 to 7 positional arguments but 8 were given

This is how it is being called:
update_vis_plot(epoch, loc_loss, repul_loss, conf_loss, epoch_plot, None,'append', epoch_size)

Function definition is:
def update_vis_plot(iteration, loc, conf, window1, window2, update_type, epoch_size=1):
print('update vist plot called')
viz.line(
X=torch.ones((1, 3)).cpu() * iteration,
Y=torch.Tensor([loc, conf, loc + conf]).unsqueeze(0).cpu() / epoch_size,
win=window1,
update=update_type
)
# initialize epoch plot on first iteration
if iteration == 0:
print('passed if iteration = 0 condition')
viz.line(
X=torch.zeros((1, 3)).cpu(),
Y=torch.Tensor([loc, conf, loc + conf]).unsqueeze(0).cpu(),
win=window2,
update=True
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant