Skip to content

Commit fcc8a4e

Browse files
committed
Add example how to load quantized net
1 parent 11d4540 commit fcc8a4e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

trainer/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from batchloader import BatchLoader
88
from model import PerspectiveNetwork
99
from train import train
10+
from quantize import load_quantized_net
1011

1112

1213
def main():
@@ -31,6 +32,8 @@ def load_config(config_path="config.json"):
3132

3233
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
3334
model = PerspectiveNetwork(config["hidden_layer_size"]).to(device)
35+
#model = load_quantized_net("nnue.bin", config["hidden_layer_size"], 403, 64).to(device)
36+
model.eval("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR", device)
3437

3538
paths = [os.path.join(data_root.encode("utf-8"), file.encode("utf-8")) for file in os.listdir(data_root)]
3639

0 commit comments

Comments
 (0)