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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

from setuptools import find_namespace_packages
from setuptools import setup
import re


def _get_sonnet_version():
with open('sonnet/__init__.py') as fp:
for line in fp:
if line.startswith('__version__'):
g = {}
exec(line, g) # pylint: disable=exec-used
return g['__version__']
match = re.search(r"__version__\s*=\s*['\"]([^'\"]+)['\"]", line)
if match:
return match.group(1)
raise ValueError('Could not parse __version__ from line')
raise ValueError('`__version__` not defined in `sonnet/__init__.py`')


Expand Down
2 changes: 1 addition & 1 deletion sonnet/src/nets/dnc/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def read(memory,
"""
with tf.name_scope("read_memory"):
if squash_before_access:
squash_op(weights)
memory = squash_op(memory)
read_word = tf.matmul(weights, memory)
if squash_after_access:
read_word = squash_op(read_word)
Expand Down