official-stockfish / nnue-pytorch

Stockfish NNUE (Chess evaluation) trainer in Pytorch
GNU General Public License v3.0
326 stars 100 forks source link

visualize.py fails on current arch .nnue #188

Open vondele opened 2 years ago

vondele commented 2 years ago
Traceback (most recent call last):
  File "visualize.py", line 580, in <module>
    main()
  File "visualize.py", line 545, in main
    model = load_model(args.model, feature_set)
  File "visualize.py", line 465, in load_model
    reader = NNUEReader(f, feature_set)
  File "/home/vondele/chess/vondele/nnue-pytorch/serialize.py", line 149, in __init__
    self.read_feature_transformer(self.model.input, self.model.num_psqt_buckets)
  File "/home/vondele/chess/vondele/nnue-pytorch/serialize.py", line 184, in read_feature_transformer
    weights = self.tensor(numpy.int16, [shape[0], shape[1]-num_psqt_buckets])
  File "/home/vondele/chess/vondele/nnue-pytorch/serialize.py", line 176, in tensor
    d = d.reshape(shape)
RuntimeError: shape '[23296, 1024]' is invalid for input of size 23499680
Sopel97 commented 2 years ago

Yea, this script has been left quite behind. It needs some serious reengineering due to feature set changes and much different sizes and counts of layers to visualize.