chengchingwen / Transformers.jl

Julia Implementation of Transformer models
MIT License
523 stars 74 forks source link

Bert Cola Example Missing Import #100

Closed jackn11 closed 2 years ago

jackn11 commented 2 years ago

In the example at the link below, line 36 yields the error that todevice is not defined. This is because there is no general import which includes that method such as using Transformers which includes that method in the file. This could easily be fixed by including using Transformers at the top of the file.

https://github.com/chengchingwen/Transformers.jl/blob/master/example/BERT/cola/train.jl

chengchingwen commented 2 years ago

Because it's not the top-level entry. Please refer to the instructions in the readme