Questions tagged [pytorch-lightning]

The tag has no usage guidance.

0 votes
0 answers
11 views

How to plot multiple scalars in Tensorboard in the same figure without spamming the experiment list?

I want to create graphs like this one but without causing spam like this All I could find was this answer, which explains only either how to plot such a multi-scalar graph with spam, or avoid spam ...
user avatar
  • 18.4k
0 votes
0 answers
23 views

PyTorch Lightning - How to automatically reload last checkpoint when loss unexpectedly spikes?

I'm facing a problem where during training, my loss will unexpectedly spike, like so: When this happens, I want to automatically reload the last checkpoint, reset the optimizer and resume training. ...
user avatar
1 vote
1 answer
31 views

Pytorch precision and recall error: The `target` has to be an integer tensor

I have this pytorch code (full code is the 'graph level tasks: graph classification' from here: class GraphLevelGNN(pl.LightningModule): def __init__(self, **model_kwargs): super()....
user avatar
  • 1,163
-1 votes
0 answers
22 views

Tensorboard is not creating any files

I am trying to use tensorboard with pytorch lightning. The code runs, but nothing gets created in the tensorboard logs folder. Relevant (not complete) code: class LightningClassifier(LightningModule): ...
user avatar
  • 18.4k
0 votes
0 answers
41 views

Improving inference time of my pytorch model after profiling

I'm trying to reduce the inference time of a model I have to put in production. I did not design it. It takes ~200/300ms to infer. I did the following to profile it : with profile(activities=[...
user avatar
0 votes
0 answers
20 views

Understanding "mdmc_reduce" parameter using torchmetrics F1 Score

I'm trying to understand how to use the parameter mdmc_reduce when calculating F1 Score using torchmetrics in a multi-class classification problem (12 classes). I have: #y_pred -> Output ...
user avatar
0 votes
0 answers
22 views

ReduceLROnPlateau with pytroch_lightning and horovod

When I use torch.optim.lr_scheduler.ReduceLROnPlateau with horovod to train my net, horovod will check weather my lr_scheduler is pytorch_lightning.utilities.types ._LRScheduler or not, just like ...
user avatar
0 votes
0 answers
22 views

Reweighting classes for NLP problem in pytorch lightning

I am implementing a Roberta model in pytorch-lightning. I have 12 classes that I encoded using one-hot encoding and I would like to be able to add a weight to each of those classes, and then compute ...
user avatar
0 votes
0 answers
34 views

AttributeError: 'NoneType' object has no attribute 'state_dict' in Azure ML Studio with PyTorch

I'm a beginner at PyTorch and I've been trying to set up a PyTorch model in Azure ML Studio. The code runs fine in Google Colab but in Azure ML notebook, I get this error: File /anaconda/envs/...
user avatar
0 votes
1 answer
195 views

python - TypeError: __init__() got an unexpected keyword argument 'checkpoint_callback'

I'm getting this error message: TypeError Traceback (most recent call last) <ipython-input-41-2892cdd4e738> in <module>() 5 max_epochs=N_EPOCHS, ...
user avatar
  • 309
0 votes
2 answers
78 views

omp_set_nested routine deprecated, please use omp_set_max_active_levels instead

I started getting the following warning repeatedly when running my PyTorch Lightning deep learning scripts, at execution start and then all through the training: "OMP: Info #276: omp_set_nested ...
user avatar
0 votes
2 answers
43 views

mat1 and mat2 shapes cannot be multiplied Pytorch lightning CNN

I'm working on a CNN for a project using Pytorch lightning. I don't know why am I getting this error. I've check the size of the output from the last maxpool layer and it is (-1,10,128,128). The error ...
user avatar
1 vote
1 answer
63 views

Predict with pytorch lightning when using BCEWithLogitsLoss for training

I'm trying to see how my trained model would predict a single instance of y and have of list of predicted and actual y. It seems I'm missing a few steps and I'm not sure how to implement the ...
user avatar
  • 43
1 vote
1 answer
99 views

Unable to train a self-supervised(ssl) model using Lightly CLI

I am unable to train a self-supervised(ssl) model to create image embeddings using the lightly cli: Lightly Platform Link. I intend to select diverse example from my dataset to create an object ...
user avatar
  • 11
1 vote
2 answers
45 views

How to convert a generator to a Pytorch Dataloader?

I have a generator that creates synthetic data. How can I convert this into a PyTorch dataloader?
user avatar

15 30 50 per page
1
2 3 4 5
24