lmjohns3 / theanets

Neural network toolkit for Python
http://theanets.rtfd.org
MIT License
328 stars 74 forks source link

update graph._hash to construct the same key for the same kwargs. #86

Closed qyouurcs closed 9 years ago

qyouurcs commented 9 years ago

See the discussions on google group: https://groups.google.com/forum/#!topic/theanets/nL6Nis29B7Q

lmjohns3 commented 9 years ago

The more I think about this the more it seems sufficient to just sort the args. Maybe just change the add line to add(sorted(kwargs))?

qyouurcs commented 9 years ago

Sure, I updated the commit.

sorted(kwargs) will only return the sorted keys(). This updated version does not use OrderedDict, but use the sorted key-value pair.

lmjohns3 commented 9 years ago

Ah right! This looks much simpler.

It looks like the tests are failing: https://travis-ci.org/lmjohns3/theanets/jobs/71166869. Can you fix this up?