DeepLearning icon indicating copy to clipboard operation
DeepLearning copied to clipboard

Fix type of a constant value

Open piyo7 opened this issue 11 years ago • 1 comments

The type of "val a" in dA.scala is Double. However, the type of "1 / n_visible" is Int. Undesirable Implicit type conversion may occur as following example.

scala> val a : Double = 1 / 2
a: Double = 0.0

piyo7 avatar Mar 20 '14 06:03 piyo7

BTW, the file RBM.scala has the same bug at line 22. This bug will cause the weighting variable W be all 0 while initialization.

Wei-1 avatar Nov 18 '16 16:11 Wei-1