We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34ad243 commit 7a609a6Copy full SHA for 7a609a6
1 file changed
stan/math/rev/core/var.hpp
@@ -390,8 +390,6 @@ class var_value<T, internal::require_matrix_var_value<T>> {
390
reverse_pass_callback(
391
[this_vi = this->vi_, other_vi = other.vi_]() mutable {
392
other_vi->adj_ += this_vi->adj_;
393
- // Reset the adjoint for `this` to replicate SoA before assignment
394
- this_vi->adj_.setZero();
395
});
396
}
397
0 commit comments