Thank you for your reply
I tried the code that you write and the result like below
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([32, 1024]). Output shape torch.Size([32, 8])
Input shape: torch.Size([14, 1024]). Output shape torch.Size([14, 8])

in preparing my dataset i had print the shape
((1934, 1024), (1934, 8), (1934, 1024), (1934, 1024))

data shape are changing when it come to loop in training