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

How to convert KataGo .bin network file to PyTorch .pth? #2

Open
ZGJ605 opened this issue Dec 21, 2021 · 9 comments
Open

How to convert KataGo .bin network file to PyTorch .pth? #2

ZGJ605 opened this issue Dec 21, 2021 · 9 comments

Comments

@ZGJ605
Copy link

ZGJ605 commented Dec 21, 2021

No description provided.

@isty2e
Copy link
Owner

isty2e commented Dec 22, 2021

convert.py already can load the (v8) .bin model into PyTorch. You can just torch.save() with appropriate arguments to save the model as .pt or .pth.

@ZGJ605
Copy link
Author

ZGJ605 commented Dec 22, 2021

Does it support b6c96?

@ZGJ605
Copy link
Author

ZGJ605 commented Dec 22, 2021

I can not load https://d3dndmfyhecmj0.cloudfront.net/g170/neuralnets/index.html. successfully.And what is config file?

@isty2e
Copy link
Owner

isty2e commented Dec 22, 2021

You can download some networks from https://katagotraining.org/networks/ (note that only v8 networks are supported for the time being so most recent ones are not supported). Once you unzip the .gz file, you'll see there is a .json config file.

@ZGJ605
Copy link
Author

ZGJ605 commented Dec 22, 2021

I have found networks .But I can not find the config file.
image

@isty2e
Copy link
Owner

isty2e commented Dec 22, 2021

Extract the .bin.gz file first.

@ZGJ605
Copy link
Author

ZGJ605 commented Dec 22, 2021

I have extracted but not found.
image

@isty2e
Copy link
Owner

isty2e commented Dec 22, 2021

Then download the corresponding .zip file (Raw TF weights) and extract it. model.config.json is in there.

@ZGJ605
Copy link
Author

ZGJ605 commented Dec 23, 2021

How can I change the board size?

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