Hi. I don’t understand why Albert does this
outputs = list(Yoh.swapaxes(0,1))
Somebody can explain me, please
Thanks
Hi. I don’t understand why Albert does this
outputs = list(Yoh.swapaxes(0,1))
Somebody can explain me, please
Thanks
The shape of Yoh is (m, Ty, len(machine_vocab))
, i.e., one-hot representation of Y.
Then, please look at modelf()
that you worked. In the step 1, input X
is processed by Bidirectional LSTM. Then, step 2 starts.
In this step, the important index is Ty
, time step (length) of Y. And, output is created as the list of output from each time step.
So, we need to pick the Ty (axis 1) to be the list length, and create a list of (m, len(machine_vocab))
.
And, easiest way to do that is,
len(outputs) = 10
as Ty=10.