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

about torch.stack(self.grad_norms) #30

Open
jinzitian opened this issue Jun 30, 2023 · 3 comments
Open

about torch.stack(self.grad_norms) #30

jinzitian opened this issue Jun 30, 2023 · 3 comments

Comments

@jinzitian
Copy link

image

这里运行的时候报了 RuntimeError: stack expects a non-empty TensorList 的错误,看了下代码,确实是空的,这个地方要怎么解决呢?

@KaiLv69
Copy link
Collaborator

KaiLv69 commented Jul 1, 2023

你好,在loss.backward()的过程中会对self.grad_norms进行append。你对代码进行了哪些改动?

@jinzitian
Copy link
Author

你好,在loss.backward()的过程中会对self.grad_norms进行append。你对代码进行了哪些改动?

我没有改动哈,贴出来的就是库上的代码,只是报错了找到这个地方~~

@KaiLv69
Copy link
Collaborator

KaiLv69 commented Jul 1, 2023

我这里直接使用bash run.sh难以复现这个问题,请问您能提供进一步的shell命令和配置吗(如果有改动的话)?

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

2 participants