Git Product home page Git Product logo

Comments (9)

Sopel97 avatar Sopel97 commented on June 2, 2024

The current networks (as stored in .nnue) have the feature set HalfKAv2_hm, but serialize.py uses HalfKAv2_hm^ by default. You need to specify --features=HalfKAv2_hm.

from nnue-pytorch.

umgefahren avatar umgefahren commented on June 2, 2024

I'm having a similar issue. After reading this I changed the features value, but I still get this error:

Traceback (most recent call last):
  File "/content/nnue-pytorch/serialize.py", line 361, in <module>
    main()
  File "/content/nnue-pytorch/serialize.py", line 319, in main
    reader = NNUEReader(f, feature_set)
  File "/content/nnue-pytorch/serialize.py", line 194, in __init__
    self.read_header(feature_set, fc_hash)
  File "/content/nnue-pytorch/serialize.py", line 215, in read_header
    self.read_int32(VERSION) # version
  File "/content/nnue-pytorch/serialize.py", line 292, in read_int32
    raise Exception("Expected: %x, got %x" % (expected, v))
Exception: Expected: 7af32f20, got 30322d2d

Why is this happening?

from nnue-pytorch.

Sopel97 avatar Sopel97 commented on June 2, 2024

What network are you trying to load, what's the CLI invokation, and what version of nnue-pytorch

from nnue-pytorch.

umgefahren avatar umgefahren commented on June 2, 2024

I'm running the master branch of nnue-pytorch.
My cli invocation was:

python3 serialize.py --features=HalfKAv2_hm ../nn.nnue converted.pt

That's the NNUE I downloaded:
https://tests.stockfishchess.org/api/nn/nn-5af11540bbfe.nnue

from nnue-pytorch.

Sopel97 avatar Sopel97 commented on June 2, 2024

I'm running the master branch of nnue-pytorch. My cli invocation was:

python3 serialize.py --features=HalfKAv2_hm ../nn.nnue converted.pt

That's the NNUE I downloaded: https://tests.stockfishchess.org/api/nn/nn-5af11540bbfe.nnue

This network has L1 size of 1536. Since then the size was changed to 2048. You'd need to modify model.py to load it with the current master nnue-pytorch. Sadly we don't have an easy way to diagnose such issues and it's hard to decide on a modification of the network format to include the necessary information.

from nnue-pytorch.

umgefahren avatar umgefahren commented on June 2, 2024

Is there a model I can download that has the 2048 size?
Maybe it helps to give some additional context: My intention is to convert the PyTorch model to a CoreML model, this is however harder then expected.

I changed the variable to 1536, however it doesn't help.
I'm also not entirely sure that I have installed the right dependencies. Maybe a requirements.txt file could clarify.

from nnue-pytorch.

Sopel97 avatar Sopel97 commented on June 2, 2024

https://tests.stockfishchess.org/api/nn/nn-c38c3d8d3920.nnue

what do you need the coreML model for? Either way, I don't think it has the necessary functions.

from nnue-pytorch.

umgefahren avatar umgefahren commented on June 2, 2024

This didn't work either. I still get the same option.

I'm writing a chess engine, trying to take advantage of Apple Silicon.

from nnue-pytorch.

Sopel97 avatar Sopel97 commented on June 2, 2024

Can't replicate, the following works:

curl -L http://tests.stockfishchess.org/api/nn/nn-c38c3d8d3920.nnue -o nn-c38c3d8d3920.nnue
python serialize.py --features=HalfKAv2_hm nn-c38c3d8d3920.nnue nn-c38c3d8d3920.nnue.pt

from nnue-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.