Comments (5)
@JoaoLages
I encountered the same NaN problem in some parameter settings. (usually happens when the hidden dimension is small.) After debugging, I found it is because two parameters (bias_word and bias_sent)are not initialized which may contain NaN.
Add self.bias_word.data.uniform_(-0.1,0.1) to init() of AttentionWordRNN.
Add self.bias_sent.data.uniform_(-0.1,0.1) to init() of AttentionSentRNN.
It solved my problem. Hope this can help yours!
from attention-networks-for-classification.
Can you give me some more context, is it starting as NaN or is it converging to NaN?
from attention-networks-for-classification.
It is starting with NaN, then it cannot converge anymore. If it starts with a anything else other than NaN, I never saw it converging to NaN
from attention-networks-for-classification.
This problem didn't occur to me when I tested it, which data set were you using?
from attention-networks-for-classification.
I have been using another dataset, it's true, which I cannot share unfortunately. I was wondering if you had any idea on why it could happen and how to avoid it though
from attention-networks-for-classification.
Related Issues (18)
- Performance comparison to baseline models HOT 1
- how could I run this on Python 3 HOT 3
- Sentence model bug when GRU are not bidirectional HOT 1
- Dimensionalities of word minibatch and Embedding layer don't match HOT 1
- Having 2 optimizers HOT 3
- Init hidden state for the 2nd sentence onward HOT 2
- RNN mask issue
- the google drive can not open
- imdb_final.json HOT 2
- 你好 可以把数据和文本预处理的代码发我一下么 我这边访问不了
- Could I ask about the dataset `imdb_final.json`
- single lstm for all sentences HOT 1
- An example for save this model HOT 2
- single data prediction HOT 1
- Can not run the script HOT 1
- the pad_batch function is error? HOT 1
- transpose? HOT 3
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 attention-networks-for-classification.