Skip to content
Discussion options

You must be logged in to vote

Hi
For this you need to set the "default_root_dir" in the Trainer, and set the save_dir of the Logger to the same.

This works for me (latest PL version):

from argparse import ArgumentParser

import torch
from torch.nn import functional as F

import pytorch_lightning as pl
from pl_examples.basic_examples.mnist_datamodule import MNISTDataModule
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightning.loggers import TensorBoardLogger


class LitClassifier(pl.LightningModule):

    def __init__(self, hidden_dim=128, learning_rate=1e-3):
        super().__init__()
        self.save_hyperparameters()

        self.l1 = torch.nn.Linear(28 * 28, self.hparams.hidden_dim)
    …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nyxynyx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment