Comments (4)
@mn73 The code internally maps classes starting from 0 only. It is essential for you to start with 0 as for this code, it is the right approach.
from cnn_sentence.
The same error happens to me. After setting hidden_unites=[100,2] to [100,x], x is the number of classes, it works fine.
from cnn_sentence.
Hello, I have the same problem. I have 4 classes and I've changed the method "build_data_cv" to create the data with 4 classes. In particular:
datum = {"y":class_number, "text": orig_rev, "num_words": len(orig_rev.split()), "split": np.random.randint(0,cv)}
I've changed hidden_units
as you suggested, too. However, it still threw that error. Could you please help?
from cnn_sentence.
I applied the code to a dataset with 5 classes, changing hidden_units to [100,5] worked. But there's another issue that puzzled me: The model behaves quite differently depending on the output labels. Having '2,4,5,6,9' as labels, the model performs really badly and the training performance sometimes alternates between two values or has the exact same value for all epochs. So, I mapped my classes to labels '0,1,2,3,4', and the performance is much better and the strange behavior disappeared. Why is that?
from cnn_sentence.
Related Issues (20)
- AttributeError: 'module' object has no attribute 'LeNetConvPoolLayer'
- question regarding datasets HOT 2
- Dealing with overfitting HOT 1
- success with CUDA 7.5? HOT 1
- about how many times does the iteration of experiment train
- Word Embddings in Non-static Mode HOT 2
- test_model in file conv_net_sentence.py
- Permissions Denied when loading GoogleNews-vectors-negative300.bin
- how about the size of feature map? HOT 1
- How do i get the name of every layer and their size?Someone knows?
- question about clearn_str in process_data.py HOT 1
- confused on the dropout_cost_p and cost_p ??
- how much RAM do i need to process Google News dataset bin model file? HOT 3
- Confused with vocab in process_data.py, need heeeeeeelp HOT 2
- License?
- multilabel classificaion HOT 2
- What does '<PAD>' stands for?
- How much memory do I need to process bin file (i.e. GoogleNews-vectors-negative300.bin) HOT 3
- a pickle file problem HOT 3
- NotImplementedError: The image and the kernel must have the same type.inputs(float32), kerns(float64)
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 cnn_sentence.