Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TensorFlow implementation of [Pointer Networks](https://arxiv.org/abs/1506.03134
## Requirements

- Python 2.7
- [requests](http://python-requests.org/)
- [tqdm](https://github.com/tqdm/tqdm)
- [TensorFlow 0.12.1](https://github.com/tensorflow/tensorflow/tree/r0.12)

Expand Down
14 changes: 8 additions & 6 deletions layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
from tensorflow.contrib import seq2seq
from tensorflow.python.util import nest

try:
from tensorflow.contrib.layers.python.layers import utils
except:
from tensorflow.contrib.layers import utils

smart_cond = utils.smart_cond

try:
LSTMCell = rnn.LSTMCell
MultiRNNCell = rnn.MultiRNNCell
Expand All @@ -16,12 +23,7 @@
simple_decoder_fn_train = tf.contrib.seq2seq.simple_decoder_fn_train

try:
smart_cond = tf.contrib.layers.python.layers.utils.smart_cond
except:
smart_cond = tf.contrib.layers.utils.smart_cond

try:
concat_v2 = tf.python.ops.gen_array_ops._concat_v2
from tensorflow.python.ops.gen_array_ops import _concat_v2 as concat_v2
except:
concat_v2 = tf.concat_v2

Expand Down