rlaphoenix / VSGAN

Consider decorating method with @staticmethod PYL-R0201
Performance
Major
8 months agoa year old
Method doesn't use the class instance and could be converted into a static method
 954            view(x.shape[0], self.embed_dim, x_size[0], x_size[1])  # B Ph*Pw C
 955        return x
 956
 957    def flops(self): 958        flops = 0
 959        return flops
 960
Method doesn't use the class instance and could be converted into a static method
 259
 260        self.load_state_dict(self.state, strict=False)
 261
 262    def _init_weights(self, m): 263        if isinstance(m, nn.Linear):
 264            nn.init.trunc_normal_(m.weight, std=.02)
 265            if isinstance(m, nn.Linear) and m.bias is not None:
Method doesn't use the class instance and could be converted into a static method
 251
 252        self.load_state_dict(self.state, strict=False)
 253
 254    def _init_weights(self, m): 255        if isinstance(m, nn.Linear):
 256            nn.init.trunc_normal_(m.weight, std=.02)
 257            if isinstance(m, nn.Linear) and m.bias is not None: