blogposts
blogposts copied to clipboard
local variable 'values' referenced before assignment
I'm getting this error when I run
scheduler = torch.optim.lr_scheduler.LambdaLR(optimizer, lr_lambda)
It was due to error in my implementation of lr_lambda function. Sorry about that. as the error stated, what happened is that the lambaLR second argument lr_lambda was missing because of this error and that what caused the reference before assignment error.
@gamesMum I am also facing the same issue, could you please let me know, how you resolved the problem??
@Sanket-DataEnt Check that lr_lambda is assignd to a value by executing this ine lr_lambda = lambda x: math.exp(x * math.log(end_lr / start_lr) / (lr_find_epochs * len( train_loader)))
For me there was an error there.
when i run the preprocess.py the first python script for streaming tweet, it works fine but I'm not able to view/store in the pubsub. i can't see. but the code runs without error as I print data in on_status method