Comments (6)
did you use data parallel to train the model?
from bert-sentiment.
@abhishekkrthakur Yes used data parallel while training
from bert-sentiment.
does your bert_base_path has bert base uncased model files?
from bert-sentiment.
@abhishekkrthakur Fixed the issue was with data parallel. I local i was not making use of "MODEL = nn.DataParallel(MODEL)". Now working with this. Can you help me understand the use of DataParallel and if it does require after training also?
Thanks for quick replying. Good to close the issue
from bert-sentiment.
DataParallel is used only when you have multiple GPUs during training.
If you used it in training, you have to use in inference but there are other ways too.
Closing this issue for now. :)
from bert-sentiment.
@abhishekkrthakur : Can you give any leads on how to load DataParallel
GPU model on CPU?
As per pytorch docs tried following but still raises above RuntimeError
device = torch.device('cpu')
model = TheModelClass(*args, **kwargs)
model.load_state_dict(torch.load(PATH, map_location=device))
from bert-sentiment.
Related Issues (14)
- ModuleNotFoundError: No module named 'tokenizers.tokenizers'
- Requirement.txt is missing HOT 1
- Dataloader possible bug HOT 1
- In Dataset.py
- TypeError: _init_() got an unexpected keyword argument 'comment_text' and AttributeError: module 'config' has no attribute 'DEVICE'
- requirements.txt file is missing
- line 15 model.py HOT 1
- In file train.py line 13 (get_linear_schedule_with_warmup import)
- Loading DataParallel GPU model on CPU HOT 7
- how to train on multi classes data? HOT 1
- index out of range HOT 3
- multi-label classification problem HOT 3
- IndexError: index ? is out of bounds for axis 0 with size ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bert-sentiment.