Skip to content

Question about class Ublock #16

Description

@PoistRXE

wen博,你好
我有一个问题想请教您,是关于'train_pointgroup.py'中创建网络模型时用到的UBlock类
这个类的forward方法实现如下:

  def forward(self, input):
      output = self.blocks(input)
      identity = spconv.SparseConvTensor(output.features, output.indices, output.spatial_shape, output.batch_size)
      if len(self.nPlanes) > 1:
          output_decoder = self.conv(output)
          output_decoder = self.u(output_decoder)
          output_decoder = self.deconv(output_decoder)
          output.features = torch.cat((identity.features, output_decoder.features), dim=1)
          output = self.blocks_tail(output)

      return output

当len(self.nPlanes) > 1时,output.features的维度是self.nPlanes[0]*2,output的维度是self.nPlanes[0],但是self.blocks_tail()需要output和output.features这两个tensor的维度都是self.nPlanes[0],为什么这里会出现函数输入维度和实际输入维度不一致的情况呢?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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