Skip to content

Commit fd0349f

Browse files
committed
v20200421
1 parent 33c60d6 commit fd0349f

18 files changed

+0
-139
lines changed

rnn_class/batch_gru.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import numpy as np
103
import theano

rnn_class/batch_parity.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import theano
103
import theano.tensor as T

rnn_class/batch_units.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import numpy as np
103
import theano
@@ -13,7 +6,6 @@
136
def init_weight(Mi, Mo):
147
return np.random.randn(Mi, Mo) * np.sqrt(2.0 / Mi)
158

16-
179
class SimpleRecurrentLayer:
1810
def __init__(self, Mi, Mo, activation):
1911
self.Mi = Mi

rnn_class/batch_wiki.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from future.utils import iteritems
5-
from builtins import range
6-
# Note: you may need to update your version of future
7-
# sudo pip install -U future
81

92
import os
103
import sys
@@ -20,7 +13,6 @@
2013
from util import init_weight, get_wikipedia_data
2114
from brown import get_sentences_with_word2idx_limit_vocab
2215

23-
2416
class RNN:
2517
def __init__(self, D, hidden_layer_sizes, V):
2618
self.hidden_layer_sizes = hidden_layer_sizes

rnn_class/brown.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
from nltk.corpus import brown
103
import operator

rnn_class/gru.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import numpy as np
103
import theano

rnn_class/lstm.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-pythonfrom __future__ import print_function, division
3-
from builtins import range
4-
# Note: you may need to update your version of future
5-
# sudo pip install -U future
6-
71

82
import numpy as np
93
import theano

rnn_class/mlp_parity.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import numpy as np
103
import theano
@@ -14,7 +7,6 @@
147
from util import init_weight, all_parity_pairs
158
from sklearn.utils import shuffle
169

17-
1810
class HiddenLayer(object):
1911
def __init__(self, M1, M2, an_id):
2012
self.id = an_id

rnn_class/poetry_classifier.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import theano
103
import theano.tensor as T

rnn_class/rrnn_language.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from future.utils import iteritems
5-
from builtins import range
6-
# Note: you may need to update your version of future
7-
# sudo pip install -U future
8-
91

102
import theano
113
import theano.tensor as T

rnn_class/srn_language.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from future.utils import iteritems
5-
from builtins import range
6-
# Note: you may need to update your version of future
7-
# sudo pip install -U future
81

92

103
import theano

rnn_class/srn_language_tf.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from future.utils import iteritems
5-
from builtins import range
6-
# Note: you may need to update your version of future
7-
# sudo pip install -U future
8-
91

102
import tensorflow as tf
113
import numpy as np

rnn_class/srn_parity.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import theano
103
import theano.tensor as T

rnn_class/srn_parity_tf.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import tensorflow as tf
103
import numpy as np

rnn_class/tf_parity.py

-14
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import tensorflow as tf
103
import numpy as np
114
import matplotlib.pyplot as plt
125

13-
# from tensorflow.python.ops import rnn as rnn_module
14-
15-
######## This only works for pre-1.0 versions ##########
16-
# from tensorflow.python.ops.rnn import rnn as get_rnn_output
17-
# from tensorflow.python.ops.rnn_cell import BasicRNNCell, GRUCell
18-
########################################################
19-
206
########## This works for TensorFlow v1.0 ##############
217
from tensorflow.contrib.rnn import static_rnn as get_rnn_output
228
from tensorflow.contrib.rnn import BasicRNNCell, GRUCell

rnn_class/util.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from builtins import range
5-
# Note: you may need to update your version of future
6-
# sudo pip install -U future
7-
81

92
import numpy as np
103
import string

rnn_class/visualize_embeddings.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from future.utils import iteritems
5-
from builtins import range
6-
# Note: you may need to update your version of future
7-
# sudo pip install -U future
8-
91

102
import json
113
import numpy as np

rnn_class/wiki.py

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python
2-
# https://udemy.com/deep-learning-recurrent-neural-networks-in-python
3-
from __future__ import print_function, division
4-
from future.utils import iteritems
5-
from builtins import range
6-
# Note: you may need to update your version of future
7-
# sudo pip install -U future
8-
91

102
import sys
113
import theano

0 commit comments

Comments
 (0)