DeepLearning
DeepLearning copied to clipboard
Fix type of a constant value
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
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.