Mo-yun

Results 4 comments of Mo-yun

这个归一化模块每个会增加4次Raster ```python class LayerNorm(nn.Module): def __init__(self, channels): super().__init__() self.register_parameter("weight", nn.Parameter(torch.ones([channels]))) self.register_parameter("bias", nn.Parameter(torch.zeros([channels]))) def forward(self, x): x_var, x_mean = torch.var_mean(x) x = (x - x_mean) / (x_var + 1e-7)**0.5 x =...

整体模型是conformer架构的,大致测试了一下,每个全连接层都会增加2次Raster

没有被fuse,我只想在最后一维加weight和bias所以没有用torch的官方实现,似乎无法自动fuse。 我把该模块的weight和bias 用broadcast操作拓展之后再过torch的layernorm可以大幅减少Raster数量

还有一个,我发现Depth-wise conv似乎会被拆分成多个卷积,导致卷积数量和Raster数量大幅增加