Skip to content

请求增加两个特性 #6

@youfeng1024

Description

@youfeng1024

一个是生成输出时,可以在某个地方标注出该代码所在类的类名,方便定位
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)

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