if x is  data and y is label, usually we would put them in one dataset to make sure that y is the label of x, especially when you  want  to use  shuffle sometimes.  But I guess  it’s  ok here.
Also  try  init the  linear layers with methods from  torch.nn.init