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

Chapter 3.2.6: 关于验证代码的疑问 #468

Open
Zyjsjtu opened this issue Dec 16, 2023 · 0 comments
Open

Chapter 3.2.6: 关于验证代码的疑问 #468

Zyjsjtu opened this issue Dec 16, 2023 · 0 comments

Comments

@Zyjsjtu
Copy link

Zyjsjtu commented Dec 16, 2023

# 加载参数到网络中
load_param_into_net(net, param_dict)
# 使用函数model.predict预测image对应分类
output = model.predict(Tensor(data['image']))
# 输出预测分类与实际分类
print(f'Predicted: "{predicted[0]}", Actual: "{labels[0]}"')

Question: 导入参数之后,预测model还是沿用之前的模型吗?如果是只是想展示如何使用checkpoint加载到模型中,这里的内容也不完整?又或者Mindspore加载参数后model也会随之更新? 谢谢解答。

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

1 participant