Skip to content

Commit

Permalink
Reworked the reset weights/biases function
Browse files Browse the repository at this point in the history
  • Loading branch information
dsblank committed Sep 12, 2018
1 parent 26d667f commit f34dc71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conx/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA

__version__ = "3.7.4"
__version__ = "3.7.5"
VERSION = tuple([(int(v) if v.isdigit() else v)
for v in __version__.split(".")])
6 changes: 3 additions & 3 deletions conx/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,10 @@ def reset_weights(self):
"""
session = K.get_session()
for layer in self.model.layers:
if hasattr(layer, 'kernel_initializer'):
if hasattr(layer, 'kernel'):
layer.kernel.initializer.run(session=session)
if hasattr(layer, 'bias_initializer'):
layer.bias.initializer.run(session=session)
elif hasattr(layer, 'cell'):
layer.cell.kernel.initializer.run(session=session)

def test(self, batch_size=32, show=False, tolerance=None, force=False,
show_inputs=True, show_outputs=True,
Expand Down

0 comments on commit f34dc71

Please sign in to comment.