Comments (10)
yup!
in the lightningModule you can call self.experiment. that’s a summarywriter for tensorboard. for the api of that refer to pytorch summarywriter.
https://pytorch.org/docs/stable/tensorboard
it’s all explained here: https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#tensorboard-support
realized self.experiment from docs. adding now!
from lightning.
example:
https://pytorch-lightning-bolts.readthedocs.io/en/latest/vision_callbacks.html#confused-logit
from lightning.
@qmpzzpmq
There should be
tensorboard = self.logger.experiment
grid = torchvision.utils.make_grid(...)
tensorboard.add_image(f'{stage}_samples', grid.clamp(0., 1.), self.current_epoch*self.batch_size + batch_idx)
from lightning.
@tmquan can you update to the latest test-tube version and try again?
from lightning.
Is there an approach to only log a subset of images instead of all over the validation_step
or test_step
call?
from lightning.
@williamFalcon I don't think it's a feasible solution.
It means returning the outputs of the forward pass from training_step
.
However, as soon as you override training_epoch_end
, it will stack things up in the GPU, until it fill its/their memory.
from lightning.
@ceceu have you tried
torchvision.utils.make_grid()
and then log images?
from lightning.
@epignatelli you can create a variable such as
self.imgs = # something
and then plot these. This will work with DDP and the regular single GPU case but will not work with DP the default version does not support state maintenance.
from lightning.
Thanks @ananyahjha93 and @williamFalcon, I guess the callback approach is the best practice.
from lightning.
Hi, right now is there any method to call tensorboard's add_image
add_audio
from lightning.
Related Issues (20)
- FSDP Strategy checkpoint loading
- Current FSDPPrecision does not support custom scaler for 16-mixed precision
- Differentiate testing multiple sets/models when logging
- Issue in Manual optimisation, during self.manual_backward call HOT 1
- Existing metric keys not moved to device after LearningRateFinder
- Checkpoint every_n_steps reruns epoch on restore HOT 3
- Metrics logged by self.log and metric.compute() are different HOT 1
- Multi-node Training with DDP stuck at "Initialize distributed..." on SLURM cluster HOT 3
- Full validation after first microbatch when training after LearningRateFinder
- Add a warning when some of the modules are in eval mode before the training stage
- why pytorch-lightning doc say "Model-parallel training (FSDP and DeepSpeed)". I think there is something wrong. HOT 1
- AWS Trainium fails number of device validation when using more than 1 accelerator on the instances
- OnExceptionCheckpoint: training resumes if ckpt found, even if no ckpt_path provided
- TensorBoardLogger has the wrong epoch numbers much more than the fact HOT 1
- How to incorporate vLLM in Lightning for LLM inference?
- WandbLogger `save_dir` and `dir` parameters do not work as expected.
- Loading large models with fabric, FSDP and empty_init=True does not work
- Unable to extract confusion matrix as a metric from trainer HOT 1
- Torchmetrics Accuracy issue when dont shuffle test data. HOT 1
- ModelCheckpoint: Using save_top_k, only the first k models are stored, not the best k models HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightning.