How To: Specify input_shape when it's not known in advance
As far as I can see all of the examples assume that the input shape is known in advance, i.e. MNIST images which have fixed C,H and W. But I'm working with multi-variate time series data, superficially investigating transforms which alter the number of input series.
In the example below, transforms is passed to the constructor and used to enhance the dataset loaded in prepare_data. However these transforms may alter the shape of the data, but (unless I'm mistaken) the input and output dimensions has to be known before constructing the LightningModule.
Is there a canonical way of handling this pattern in Lightning?
class TCN(pl.LightningModule):
    def __init__(self,  input_shape, output_shape, transform, hparams):
        super().__init__()
        self.hparams = hparams
        self.transform = transform
        self.tcn = TemporalConvNet(input_shape, [self.hparams.filters] * self.hparams.layers, self.hparams.kernel_size, dropout=self.hparams.dropout)
        self.decoder = nn.Linear(self.hparams.filters, output_shape)

    def prepare_data(self):
         self.train_dataset, self.val_dataset = load_dataset()
         self.train_dataset, self.val_dataset  = self.transform(self.train_dataset), self.transform(self.val_dataset)