You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static double[] clip(double[] values, double min, double max) { for (int i = 0; i < values.length; i++) { values[i] = Math.min(1, Math.max(0, values[i])); } return values; }
Doesn't ever reference the min and max parameters, instead it always clips to 0,1
This doesn't currently cause a problem because the only usages (in SpatialPooler) call it with params that currently happen to be 0,1 (c.getSynPermMin(), c.getSynPermMax())
However this is a bug just waiting to happen
Sorry, I'm not setup to make contributions
The text was updated successfully, but these errors were encountered:
public static double[] clip(double[] values, double min, double max) { for (int i = 0; i < values.length; i++) { values[i] = Math.min(1, Math.max(0, values[i])); } return values; }
Doesn't ever reference the min and max parameters, instead it always clips to 0,1
This doesn't currently cause a problem because the only usages (in SpatialPooler) call it with params that currently happen to be 0,1 (c.getSynPermMin(), c.getSynPermMax())
However this is a bug just waiting to happen
Sorry, I'm not setup to make contributions
The text was updated successfully, but these errors were encountered: