Skip to content

Instantly share code, notes, and snippets.

@j-min
Last active December 11, 2018 02:06
Show Gist options
  • Save j-min/481749dcb853b4477c4f441bf7452195 to your computer and use it in GitHub Desktop.
Save j-min/481749dcb853b4477c4f441bf7452195 to your computer and use it in GitHub Desktop.
TensorFlow 0.9 implementation of BasicRNNCell based on hunkim's tutorial
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goddoe
Copy link

goddoe commented Sep 12, 2016

4 번째 셀에
x_data = np.array([[1,0,0,0], # h
[0,1,0,0], # e
[0,0,1,0], # l
[0,0,0,1]], # l 이부분이 잘못된 것같습니다 [0,0,1,0] 로 되어야하지 않을까요
dtype = 'f')

@j-min
Copy link
Author

j-min commented Sep 30, 2016

@goddoe 수정했습니다. 지적해주셔서 감사합니다!

@ichae
Copy link

ichae commented May 12, 2017

좋은 예제 감사합니다. 위 예제를 버전 1.0에서 실행하기 위해서는 링크된 글을 참고하시길 바랍니다.

@sys505moon
Copy link

위에 모든분들 너무나 감사합니다. 혼자 실습중인데 너무나 오류나서 힘들어하고 있었는데 1.0버젼에 맞춰서 코딩수정까지 자료가 있으니 너무나 힘이 됩니다 ! 감사합니다 !

@jwon0615
Copy link

jwon0615 commented Oct 28, 2017

tensor flow 1.3이상 버전에서는
In [17]을

# Launch the graph in a session
init = tf.global_variables_initializer()

with tf.Session() as sess:
    sess.run(init)
    for i in range(100):
        sess.run(train_op, )
        result = sess.run(tf.argmax(logits, axis=1))
        print(result, [char_rdic[t] for t in result])

로 해야 작동됩니다.

@pbj0812
Copy link

pbj0812 commented Oct 1, 2018

1.8.0. 버전에서
[10]

x_split = tf.split(0, len(char_dic), x_data) 을
x_split = tf.split(x_data, len(char_dic), 0) 

으로 해야 돌아갑니다.

https://github.com/pbj0812/deep_learning/blob/master/sungkim/sungkim_tutorial_BasicRNNCell_v_1_8_0.ipynb

1.8.0에 맞게 수정해서 올렸습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment