Comments (2)
Okay, I found the solution for this. The problem with the syntax you currently have is that it tries to reuse the same cell
object num_layer
times, so we run into issues with sharing variables. So I defined each cell uniquely and avoid accidentally sharing variables. This is the code I've used that works:
@staticmethod
def get_rnncell(cell_type, cell_size, keep_prob, num_layer):
cells = []
for _ in range(num_layer):
if cell_type == "gru":
cell = rnn_cell.GRUCell(cell_size)
else:
cell = rnn_cell.LSTMCell(cell_size, use_peepholes=False, forget_bias=1.0)
if keep_prob < 1.0:
cell = rnn_cell.DropoutWrapper(cell, output_keep_prob=keep_prob)
cells.append(cell)
if num_layer > 1:
cell = rnn_cell.MultiRNNCell(cells, state_is_tuple=True)
else:
cell = cells[0]
return cell
I would like your verification that this is the right solution. And then you can close this issue.
(B.T.W. these parameters seems to work badly, don't use them)
from neuraldialog-cvae.
@dimeldo Thanks! you solution is correct. I push the changes with your suggested solution..
from neuraldialog-cvae.
Related Issues (17)
- import tensorflow.contrib.rnn.python.ops.core_rnn_cell_impl as rnn_cell ImportError: No module named core_rnn_cell_impl HOT 2
- Evaluation
- Problem about the multiple references test dataset HOT 1
- Glove word embeddings assignment HOT 1
- about performance
- About printing dialog act in test batch.
- Can we use your data in PaddlePaddle NLP's VAE example ?
- The same question about Evaluation
- Diversity
- ValueError: num_outputs should be int or long, got 400.
- Confusing about the evaluation HOT 1
- What modifications needed to train dataset without dialogue acts, metadata and features and floor? HOT 6
- How can I ignore <unk> tokens while decoding? HOT 3
- LSTM doesn't work HOT 2
- bow loss HOT 3
- questions about the sampling strategy for baseline model HOT 1
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 neuraldialog-cvae.