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

强制summary使用cpu计算 #1

Open
cjld opened this issue Mar 4, 2021 · 1 comment
Open

强制summary使用cpu计算 #1

cjld opened this issue Mar 4, 2021 · 1 comment

Comments

@cjld
Copy link

cjld commented Mar 4, 2021

def summary(model, input_size, batch_size=-1, device=None, dtypes=None):

可以在这一行添加一个修饰符@jt.flag_scope(use_cuda=0)来强制使用cpu

liuruiyang98 pushed a commit that referenced this issue Mar 4, 2021
@liuruiyang98
Copy link
Owner

将jt.int64更换为numpy.int64,现在jittorsummary已支持CUDA版本,通过 device=‘cpu’ 或者 device=‘cuda' 进行控制。

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