Skip to content

Commit

Permalink
Fix density
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanonardo committed May 3, 2019
1 parent 5ac1a5e commit a75b4c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

setup(name='pytorch-esn',
version='1.2.2',
version='1.2.3',
packages=find_packages(),
install_requires=[
'torch',
Expand Down
2 changes: 1 addition & 1 deletion torchesn/nn/reservoir.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def reset_parameters(self):
zero_weights = torch.randperm(
int(self.hidden_size * self.hidden_size))
zero_weights = zero_weights[
:round(
:int(
self.hidden_size * self.hidden_size * (
1 - self.density))]
w_hh[zero_weights] = 0
Expand Down

0 comments on commit a75b4c6

Please sign in to comment.