Skip to content

A weird thing about the gradient for each channel. #560

@hxngu

Description

@hxngu

I have printed out the gradient of feature map of one layer. However, I find a weird thing that the elements in each channel hold the same in all locations. I have written some codes to print out the gradient matrix of the layer4 of ResNet50. Basically speaking, the gradients of one channel in different locations should be different.

Image

The result is shown below. I have tried some different inputs but it still doesn't work.

Image

Looking forward to your reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions