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

feature: add make_onnx_model.py #251

Merged
merged 3 commits into from
Jan 26, 2022

Conversation

YuriCat
Copy link
Contributor

@YuriCat YuriCat commented Jan 25, 2022

#233 enables us to use ONNX model created by this script.

Comment on lines 23 to 28
model.load_state_dict(torch.load(model_path), strict=False)
model.eval()
model = ModelWrapper(model)

model.load_state_dict(torch.load(model_path), strict=False)
model.eval()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is model loading needed twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stopped importing and using ModelWrapper since it is used only for init_hidden()

@YuriCat
Copy link
Contributor Author

YuriCat commented Jan 26, 2022

Since turn() is not always defined, turns()[0] is better.
I wonder there is any cases that no player acts in the original state.

@ikki407
Copy link
Member

ikki407 commented Jan 26, 2022

At initial state, a chance node perhaps exist depending on the implementation of the game (e.g. coin toss).

@ikki407 ikki407 merged commit 050cc69 into DeNA:develop Jan 26, 2022
@YuriCat YuriCat deleted the feature/add_onnx_script branch February 11, 2022 17:56
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants