Closed lazarusA closed 2 years ago
The quickest fix would be replace label = onehot(vocab, y)
with label = Basic.OneHotArray(length(vocab), y)
. It's because we are using a rare example where the input sequence is of type Int
in the tutorial. If you are going to modified the example to do some real task, than use the original one (onehot(vocab, y)
)
And this happen because some API change in Transformers v0.1.13. I should update the docs/example
ok. This fixes the issue here. Thanks.
I'm testing some code from the docs. In this case the copy task.
https://chengchingwen.github.io/Transformers.jl/dev/tutorial/#define-the-loss-and-training-loop
I notice that things go wrong in the loss function definition. Due to the onehot method.
By running that code one gets this error.
this the env that I'm using.
any quick work around this issue?