dataloader NotImplementedError
I want to use a changed GAN structure from the sample here with random samples of shape(3200,5). When run, NotImplementedError occurs. I dont see where the problem is. Thanks for help.
from argparse import ArgumentParser
from collections import OrderedDict
import torch
import torch.nn.functional as F
import pytorch_lightning as pl
from torch.utils.data import DataLoader
import torch.nn as nn

lnum=torch.randn(1).item()*0.0001
print(lnum)

class ComeModel(nn.Module):
    def __init__(self,m_in,m_hid,m_out):
        super(ComeModel,self).__init__()
        self.model=nn.Sequential(
            nn.Linear(m_in, m_hid),
            nn.LeakyReLU(lnum,inplace=True),
            nn.Linear(m_hid, m_out),
            nn.LeakyReLU(lnum, inplace=True),
        )

    def forward(self,x):
        out = self.model(x)
        return out

class GoModel(nn.Module):
    def __init__(self,m_in,m_hid,m_out):
        super(GoModel,self).__init__()
        self.model=nn.Sequential(
            nn.Linear(m_in, m_hid),
            nn.LeakyReLU(lnum,inplace=True),
            nn.Linear(m_hid, m_out),
            nn.LeakyReLU(lnum, inplace=True),
        )
    def forward(self,x):
        out = self.model(x)
        return out

class TranscationModel(pl.LightningModule):
    def __init__(self,hparams):
        super(TranscationModel,self).__init__()
        self.hparams=hparams
        self.comer=ComeModel(self.hparams.in_fea,self.hparams.hid_dim,self.hparams.out_fea)
        self.goer=GoModel(self.hparams.in_fea,self.hparams.hid_dim,self.hparams.out_fea)
    def forward(self,x):
        chart_x = x[:3]
        fund_x = x[:]

        out =torch.log(1+self.comer(chart_x)+self.comer(fund_x))-torch.log(1+self.goer(chart_x)+self.goer(fund_x))
        return out

    def peak_loss(selfself,out,y):
        return F.binary_cross_entropy(out,y)

    def training_step(self, batch, batch_nb):
        x,y=batch
        y_pred=self.forward(x)
        ploss=self.peak_loss(y_pred,y)
        tqdm_dict={'ploss':ploss}
        output=OrderedDict(
            {
                'loss':ploss,
                'progress_bar':tqdm_dict,
                'log':tqdm_dict
            }
        )
        return output

    def configure_optimizers(self):
        lr =self.hparams.lr
        b1  = self.hparams.b1
        b2 = self.hparams.b2

        opt_come=torch.optim.Adam(self.comer.parameters(),lr=lr,betas=(b1,b2))
        opt_goer = torch.optim.Adam(self.comer.parameters(), lr=lr, betas=(b1, b2))
        return [opt_come,opt_goer],[]

    @pl.data_loader
    def train_dataloader(self):
        dataset = torch.randn(3200,5)
        print(dataset.size())
        return DataLoader(dataset,batch_size=self.hparams.batch_size)



def main(hparams):
    # ------------------------
    # 1 INIT LIGHTNING MODEL
    # ------------------------
    model = TranscationModel(hparams)

    # ------------------------
    # 2 INIT TRAINER
    # ------------------------
    trainer = pl.Trainer()

    # ------------------------
    # 3 START TRAINING
    # ------------------------
    trainer.fit(model)


if __name__ == '__main__':
    parser = ArgumentParser()
    parser.add_argument("--batch_size", type=int, default=64, help="size of the batches")
    parser.add_argument("--lr", type=float, default=0.0002, help="adam: learning rate")
    parser.add_argument("--b1", type=float, default=0.5,
                        help="adam: decay of first order momentum of gradient")
    parser.add_argument("--b2", type=float, default=0.999,
                        help="adam: decay of first order momentum of gradient")
    parser.add_argument("--in_fea", type=int, default=4,
                        help="dimensionality of the input dimension")
    parser.add_argument("--hid_dim", type=int, default=10,
                        help="dimensionality of the latent space")
    parser.add_argument("--out_fea", type=int, default=1,
                        help="dimensionality of the output dimension")

    hparams = parser.parse_args()

    main(hparams)