Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1587#discussion_r52001489
  
    --- Diff: 
flink-libraries/flink-ml/src/main/scala/org/apache/flink/ml/optimization/GradientDescent.scala
 ---
    @@ -192,10 +190,18 @@ abstract class GradientDescent extends 
IterativeSolver {
           (left, right) =>
             val (leftGradVector, leftCount) = left
             val (rightGradVector, rightCount) = right
    -        // Add the left gradient to the right one
    -        BLAS.axpy(1.0, leftGradVector.weights, rightGradVector.weights)
    +
    +        // make the left gradient dense so that the following reduce 
operations (left fold) reuse
    +        // it. This strongly depends on the underlying implementation of 
the ReduceDriver
    --- End diff --
    
    The reduce is implemented somewhat like a left fold operation, just without 
having an initial value. Thus you should not convert the right element, because 
it will always be the newly read input element.


---
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.
---

Reply via email to