traveller59 / spconv

Spatial Sparse Convolution Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spconv SubMConv3d not preserving gradient in evaluation mode.

leonardo-holtz-isi opened this issue · comments

I have a model with a input convolution layer defined as

self.input_conv = spconv.SparseSequential(
            spconv.SubMConv3d(
                in_channels,
                out_channels,
                kernel_size=3,
                padding=1,
                bias=False,
                indice_key="subm1",
            )
        )

When the model is in training mode, requires_grad of both input and output of this layer is True.
However, in evaluation mode, the output's requires_grad is False. What is happening?

@leonardo-holtz-isi
Hi, I am encountering the same issue, have you resolved it?

@LandDreamer unfortunately no. I have a hypotesis that this is probably a design decision intentionally made for spconv to save resources regarding the graph computation of a model in evaluation mode.

@LandDreamer unfortunately no. I have a hypotesis that this is probably a design decision intentionally made for spconv to save resources regarding the graph computation of a model in evaluation mode.

Thanks a lot