srviest / char-cnn-text-classification-pytorch Goto Github PK
View Code? Open in Web Editor NEWCharacter-level Convolutional Neural Networks for text classification in PyTorch
License: Apache License 2.0
Character-level Convolutional Neural Networks for text classification in PyTorch
License: Apache License 2.0
This line should call getClassWeight()
It currently calls the deprecated name for the function get_class_weight()
I have been able to run the model as is but it simply not converging!
For how many epochs I should run the model?
Hi! I am using Pytorch 1.0.0 with Python 2.7 and I get the error below when running python train.py command:
Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.
x = self.log_softmax(x)
train.py:120: UserWarning: torch.nn.utils.clip_grad_norm is now deprecated in favor of torch.nn.utils.clip_grad_norm_.
torch.nn.utils.clip_grad_norm(model.parameters(), args.max_norm)
Traceback (most recent call last):
File "train.py", line 282, in
main()
File "train.py", line 279, in main
train(train_loader, dev_loader, model, args)
File "train.py", line 137, in train
loss.data[0],
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
How to fix this? Thanks!
I changed a data set, and the rest is consistent with your code, but the result above appears. I don't know the reason, please kindly answer for me in your busy schedule, thank you
When I was training, I met a problem.
File "train.py", line 278, in <module> main() File "train.py", line 275, in main train(train_loader, dev_loader, model, args) File "train.py", line 97, in train model = torch.nn.DataParallel(model).cuda() File "/usr/local/lib/python3.5/dist-packages/torch/nn/parallel/data_parallel.py", line 47, in __init__ output_device = device_ids[0] IndexError: list index out of range
please help me!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.