After I insert train like this. I got error as follows:
Auction = AuctionNet(numUser, numUnit, numGroup, k)
    Auction.train()
    optimizer = optim.SGD(Auction.monoVars, lr=0.001, momentum=0.9)
    optimizer.zero_grad()

RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
 So hard to use Pytorch.