In run_tensor.py, how to implement the forward function to handle batch data? As the final result of Network.forward should return Tensor data, so the method in Module 1 using for and list is not a choice. For now, I merely figure out one possible solution: add one more dimension to the dataset. For dataset of shape (50, 2), I will change it to (50, 1, 2) and then using the broadcasting mechanism to pass it through network.
Is there a better way to implement it?