Skip to content

Commit eb6f953

Browse files
committed
Convert to a usable package
1 parent a4debae commit eb6f953

File tree

11 files changed

+62
-11
lines changed

11 files changed

+62
-11
lines changed

dnc/__init__.py

Whitespace-only changes.

access.py renamed to dnc/access.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
from __future__ import print_function
2020

2121
import collections
22+
2223
import sonnet as snt
2324
import tensorflow as tf
2425

25-
import addressing
26-
import util
26+
from dnc import addressing
2727

2828
AccessState = collections.namedtuple('AccessState', (
2929
'memory', 'read_weights', 'write_weights', 'linkage', 'usage'))

access_test.py renamed to dnc/access_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
import tensorflow as tf
2323
from tensorflow.python.ops import rnn
2424

25-
import access
26-
import util
25+
from dnc import access, util
2726

2827
BATCH_SIZE = 2
2928
MEMORY_SIZE = 20

addressing.py renamed to dnc/addressing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
from __future__ import print_function
2020

2121
import collections
22+
2223
import sonnet as snt
2324
import tensorflow as tf
2425

25-
import util
26+
from dnc import util
2627

2728
# Ensure values are greater than epsilon to avoid numerical instability.
2829
_EPSILON = 1e-6
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
import sonnet as snt
2323
import tensorflow as tf
2424

25-
import addressing
26-
import util
25+
from dnc import addressing, util
2726

2827

2928
class WeightedSoftmaxTest(tf.test.TestCase):

dnc.py renamed to dnc/dnc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@
2323
from __future__ import print_function
2424

2525
import collections
26+
2627
import numpy as np
2728
import sonnet as snt
2829
import tensorflow as tf
2930

30-
import access
31+
from dnc import access
3132

3233
DNCState = collections.namedtuple('DNCState', ('access_output', 'access_state',
3334
'controller_state'))
File renamed without changes.

train.py renamed to dnc/train.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
from __future__ import print_function
2020

2121
import tensorflow as tf
22-
import sonnet as snt
2322

2423
import dnc
25-
import repeat_copy
24+
from dnc import repeat_copy
2625

2726
FLAGS = tf.flags.FLAGS
2827

File renamed without changes.

util_test.py renamed to dnc/util_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import numpy as np
2222
import tensorflow as tf
2323

24-
import util
24+
from dnc import util
2525

2626

2727
class BatchInvertPermutation(tf.test.TestCase):

0 commit comments

Comments
 (0)