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

big-endian machine #13

Open
earonesty opened this issue Jan 22, 2016 · 1 comment
Open

big-endian machine #13

earonesty opened this issue Jan 22, 2016 · 1 comment

Comments

@earonesty
Copy link

i want to be able to train a model on a linux box, but then ship to an ibm or sun box or any other for execution.

cannot load on a big-endian architecture when it was generated on a little-endian machine

Restoring existing nnet
Bad model version: -1834810029

but other than that i can get the program to work fine on ibm/sun

@akhti
Copy link
Contributor

akhti commented Jan 28, 2016

Well, seems that that you need some more portable format to do this kind of stuff, e.g. text. That's not so hard to force faster-rnnlm to use text format.

  • replace FreadAllOrDie with istream<< in ReadHeader in nnet.cc:19
  • replace fwrite with ostream>> in NNet::Save and NNet::SaveCompatible in nnet.cc:194
  • update Dump and Load functions in util.h:37
  • if you use maxent, you should also update MaxEnt::Dump and MaxEnt::Load in maxent.cc:43

Ok, maybe it's no absolutely trivial, but totally doable ;)

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