nnue-pytorch icon indicating copy to clipboard operation
nnue-pytorch copied to clipboard

visualize.py fails on current arch .nnue

Open vondele opened this issue 3 years ago • 2 comments

vondele avatar May 30 '22 15:05 vondele

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

vondele avatar May 30 '22 15:05 vondele

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.

Sopel97 avatar May 30 '22 16:05 Sopel97