Skip to content

Silence layer deletes data during backprop #3151

@cvondrick

Description

@cvondrick

During Backward_* in the Slience layer, it performs the following operation when propagate_down[i] is set to true:

caffe_set(bottom[i]->count(), Dtype(0), bottom[i]->mutable_cpu_data());

and similarly for the GPU.

Usually this code will not run because the Silence layer does not generally need backprop. However, if you force the network to do backprop, this will have the consequence of overwriting the bottom data blob with all zeros.

I think the correct behavior is to set the bottom diff to 0:

caffe_set(bottom[i]->count(), Dtype(0), bottom[i]->mutable_cpu_diff());

Should this be changed?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions