happynear / happynear/caffe-windows

CovarianceLayer Backward incorrect

Open
#46 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.3k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

Thanks for the port of your code. (I've learned immensely from it.)

FYI, the implementation of CovarianceLayer<>::Backward_cpu() is incorrect.
The first thing it does is get a mutable pointer to the top Blob. During backprop it shouldn't be modifying the top Blob, only the bottom Blob.

```
template
void CovarianceLayer::Backward_cpu(const vector*>& top,
const vector& propagate_down,
const vector*>& bottom) {
Dtype* top_diff = top[0]->mutable_cpu_diff();
...
```

cheers,
Doug

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.