Github user MrBago commented on a diff in the pull request:
https://github.com/apache/spark/pull/17373#discussion_r130746928
--- Diff: mllib/src/main/scala/org/apache/spark/ml/ann/Layer.scala ---
@@ -463,7 +479,7 @@ private[ml] class FeedForwardModel private(
private var outputs: Array[BDM[Double]] = null
private var deltas: Array[BDM[Double]] = null
- override def forward(data: BDM[Double]): Array[BDM[Double]] = {
+ override def forward(data: BDM[Double], containsLastLayer: Boolean):
Array[BDM[Double]] = {
// Initialize output arrays for all layers. Special treatment for
InPlace
--- End diff --
Could you add the above comment in the code, it could be useful for folks
reading/editing this in the future.
Also it seems like the last layer could also be a
SigmoidLayerWithSqueredError or a SigmiodFunction do we need to hand those
cases any differently?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]