You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
(doc) needs help on how to deal with batch data #5
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.
You are correct that this is the expected method to implement it => View, then Broadcast, and then reduce. I will add some hints to make that more clear.
You are correct that this is the expected method to implement it => View, then Broadcast, and then reduce. I will add some hints to make that more clear.
Thanks for the confirmation and then I will try to figure out what goes wrong with my code.
I finally find out that the reason why my training procedure get stuck(derivative vanish at around epoch=60). I miss the relu activation in the Network forward function. I comment here in case someone come up with the same problem which I waste for about a week to find it out.
Activity
srush commentedon Sep 6, 2020
You are correct that this is the expected method to implement it => View, then Broadcast, and then reduce. I will add some hints to make that more clear.
srush commentedon Sep 6, 2020
I will add some more docs here, in the mean time, this diagram from the next section explains the main approach https://minitorch.github.io/matrixmult.html
qlibp commentedon Sep 6, 2020
Thanks for the confirmation and then I will try to figure out what goes wrong with my code.
qlibp commentedon Sep 13, 2020
I finally find out that the reason why my training procedure get stuck(derivative vanish at around epoch=60). I miss the relu activation in the Network forward function. I comment here in case someone come up with the same problem which I waste for about a week to find it out.
srush commentedon Sep 13, 2020
Oh no! I didn't mean for that to be a hard part. I'll add more docs in the network class to describe the exact shape of the network.
Did you eventually get it working? I see why that would be frustrating.
qlibp commentedon Sep 13, 2020
Oh yeah, I finally make it work(maybe). It's still a little bit different from the result of Module 1.
srush commentedon Sep 13, 2020
Looks great!