Skip to content

Commit

Permalink
Fix missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasmus Diederichsen committed Mar 6, 2018
1 parent e7c911b commit 92c5073
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'''
import tensorflow as tf
from tensorflow.contrib.rnn import *
from math import ceil
import numpy as np
from utils import tensor_from_lstm_tuple, OptimizerSpec, resize_to_multiple, conv_layer
Expand Down Expand Up @@ -130,8 +131,8 @@ def num_activations(conv):
lstm1 = LSTMCell(memory_size, state_is_tuple=True)
if self.use_dropout:
lstm_keep_probs = [0.7, 0.8]
lstm0 = tf.contrib.rnn.DropoutWrapper(lstm0, output_keep_prob=lstm_keep_probs[0])
lstm1 = tf.contrib.rnn.DropoutWrapper(lstm1, output_keep_prob=lstm_keep_probs[1])
lstm0 = DropoutWrapper(lstm0, output_keep_prob=lstm_keep_probs[0])
lstm1 = DropoutWrapper(lstm1, output_keep_prob=lstm_keep_probs[1])
self.rnn = MultiRNNCell([lstm0, lstm1])
self.zero_state = self.rnn.zero_state(self.batch_size, tf.float32)

Expand Down

0 comments on commit 92c5073

Please sign in to comment.