@ptrblck Unfortunately not, since I am using pre defined functions (class RNASSDataGenerator) to pre-process the input data, I have to stick with the data format. I doubt the class RNASSDataGeneraor is causing the trouble.
When I use cpu, everything is ok with the batch shape for every step.
torch.Size([8, 600, 111]) cpu
Stage 1, epoch: 0,step: 0, loss: 0.7845466136932373
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu
torch.Size([8, 600, 111]) cpu