elitcloud / elit

🔠 Evolution of Language and Information Technology
https://elit.cloud
Other
47 stars 7 forks source link

gpu config should be explicitly #30

Closed imgarylai closed 5 years ago

imgarylai commented 5 years ago

https://github.com/elitcloud/elit/blob/879119955a0abaf91f9d5cc20e901aeaf8aef72b/elit/nlp/tagger/mxnet_util.py#L24-L34

We run models on a multi-gpus server, and each model use its gpu. In this case, we can't specify which gpu is gonna to be used outside this project.

hankcs commented 5 years ago

Now we can specify a particular device, eg. tagger = POSTagger(context=mx.gpu(3)).