Quick-Python-Print icon indicating copy to clipboard operation
Quick-Python-Print copied to clipboard

请求增加两个特性

Open youfeng1024 opened this issue 11 months ago • 0 comments
trafficstars

一个是生成输出时,可以在某个地方标注出该代码所在类的类名,方便定位 print(f"MODEL==>> inputs.shape: {inputs.shape}") 二是可以控制多行选中时生成输出语句的方式,是每一句后面添加还是全部添加到后面

        x = self.LN_1(inputs)
        x = x.permute(0, 2, 1)
        x = self.timeMixer(x)
        x = x.permute(0, 2, 1)
        print(f"==>> x.shape: {x.shape}")
        print(f"==>> x.shape: {x.shape}")
        print(f"==>> x.shape: {x.shape}")
        print(f"==>> x.shape: {x.shape}")

例如有些时候使用同名变量时,默认生成在最后。如果是在每个语句后生成,能节约很多操作。例如

        x = inputs.permute(0, 2, 1)
        print(f"==>> x.shape: {x.shape}")
        x = self.conv(x)
        print(f"==>> x.shape: {x.shape}")
        x = x.permute(0, 2, 1)
        print(f"==>> x.shape: {x.shape}")
        y = self.mixer(inputs, x)

youfeng1024 avatar Dec 05 '24 18:12 youfeng1024