Skip to content

Commit

Permalink
Merge pull request ericjang#1 from guohengkai/master
Browse files Browse the repository at this point in the history
Update usage of LSTMCell for newly Tensorflow
  • Loading branch information
ericjang authored Aug 27, 2016
2 parents 03bce19 + 411611f commit 00c55a4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"""

import tensorflow as tf
from tensorflow.models.rnn.rnn_cell import LSTMCell
from tensorflow.examples.tutorials import mnist
import numpy as np
import os
Expand Down Expand Up @@ -43,8 +42,8 @@

x = tf.placeholder(tf.float32,shape=(batch_size,img_size)) # input (batch_size * img_size)
e=tf.random_normal((batch_size,z_size), mean=0, stddev=1) # Qsampler noise
lstm_enc = LSTMCell(enc_size, read_size+dec_size) # encoder Op
lstm_dec = LSTMCell(dec_size, z_size) # decoder Op
lstm_enc = tf.nn.rnn_cell.LSTMCell(enc_size, state_is_tuple=True) # encoder Op
lstm_dec = tf.nn.rnn_cell.LSTMCell(dec_size, state_is_tuple=True) # decoder Op

def linear(x,output_dim):
"""
Expand Down Expand Up @@ -243,4 +242,4 @@ def binary_crossentropy(t,o):

sess.close()

print('Done drawing! Have a nice day! :)')
print('Done drawing! Have a nice day! :)')

0 comments on commit 00c55a4

Please sign in to comment.