pmsosa / cs291k Goto Github PK
View Code? Open in Web Editor NEW🎭 Sentiment Analysis of Twitter data using combined CNN and LSTM Neural Network models
🎭 Sentiment Analysis of Twitter data using combined CNN and LSTM Neural Network models
Here is the traceback :
Traceback (most recent call last):
File "train.py", line 143, in <module>
model = LSTM_CNN(x_train.shape[1],y_train.shape[1],len(vocab_processor.vocabulary_),embedding_dim,filter_sizes,num_filters,l2_reg_lambda)
File "/home/bishe/Workspace/lstm_cnn_original/lstm_cnn.py", line 39, in __init__
conv = tf.nn.conv2d(self.lstm_out_expanded, W,strides=[1, 1, 1, 1],padding="VALID",name="conv")
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 639, in conv2d
data_format=data_format, dilations=dilations, name=name)
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3162, in create_op
compute_device=compute_device)
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3208, in _create_op_helper
set_shapes_for_outputs(op)
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2427, in set_shapes_for_outputs
return _set_shapes_for_outputs(op)
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2400, in _set_shapes_for_outputs
shapes = shape_func(op)
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2330, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "/home/bishe/.local/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Negative dimension size caused by subtracting 50 from 32 for 'conv-maxpool-3/conv' (op: 'Conv2D') with input shapes: [?,50,32,1], [3,50,1,32].
What's wrong with it.
By the way, I use data in https://github.com/pmsosa/Twitter-Sentiment-Analysis/tree/master/data
After googling the error, i tried reducing batch size from 128 to 64 .. 8. No matter how many times I run, training goes fine but in evaluation I am getting this error in the beginning.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
terminate called recursively
Aborted(core dumped)
Any suggestions?
I find those issues #6, #5, #4,#1. I find the file of glove.6b.50d.txt. But I do not find other three files. And I see that link about kaggle. When I open the link, the dataset "An error occurred: Data not found". So, can you offer these files for me? I hope you can share those files if you have. thanks,please!
no data
Where do I find or how do I generate glove.6B.50d.txt file ?
我看了代码,发现good_tweets.csv和bad_tweets.csv是利用代码做出来的文件,所以我应该是需要batchgen.py代码里面的small.txt
image
目前我所看的代码不知道train.py里面的tweets.csv有没有用到,如果可以的话,能不能把small.txt 和tweets.csv文件发送给我?谢谢。
where could i get the tweets.csv and other data?
Could you give some information on csv files used, their contents etc?
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.