Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache无内容的问题 #7

Open
ZHEGG opened this issue Jan 10, 2022 · 11 comments
Open

cache无内容的问题 #7

ZHEGG opened this issue Jan 10, 2022 · 11 comments

Comments

@ZHEGG
Copy link

ZHEGG commented Jan 10, 2022

我想查看transformerdecoderlayer里的attn,在主函数中get_local.activate(),但是cache中的['transformer_decoderlayer']中是[],我的模型结构是train中调用model,model中调用transformer

@TIEHua
Copy link

TIEHua commented Feb 20, 2022

您好,我也遇到类似问题,请问您解决了么

@YNCao
Copy link

YNCao commented Feb 23, 2022

检查一下模型是否是在visualizer之后import的?

@connieku
Copy link

我也遇到类似问题,请问您解决了么

@ZHEGG
Copy link
Author

ZHEGG commented Apr 24, 2022

我也遇到类似问题,请问您解决了么

抱歉,这个问题放置太久了,可能之前代码写的不好才出现的这个问题,现在我按照作者的方式cache内是可以有内容的,我觉得你可以检查一下你主函数与模型之间的调用关系。

@connieku
Copy link

谢谢你的回复。能请你帮忙看看我的设置是否正确吗?
Attn.txt

@XuanchenLi
Copy link

可能嵌套太深了,不能把model作为参数传入其他的类。我是一开始向trainer里面传入了model,然后在trainer内部函数中cache为空。
后来直接在主函数中使用model,cache就有内容了

@userguazi
Copy link

我也有这个问题

@userguazi
Copy link

谢谢你的回复。能请你帮忙看看我的设置是否正确吗? Attn.txt

请问你解决了吗

@wang149876
Copy link

model不要eval,我改了之后就好了

@ZBox1005
Copy link

检查一下你模型是不是在get_local.clear()之前就import进来了,我是这个问题

@Jiangdd0823
Copy link

Jiangdd0823 commented Apr 15, 2024

https://github.com/chenzhik/VisualizerX
可以用这位作者改进后的,在每个嵌套都加@get_local('varname')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants