UnicodeDecodeError in the file 0-basics.ipynb
When I try to execute the 3rd python section in the file 0-basics.ipynb, I get an error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
It's due to this code
qnn = pickle.load(open("mnist-w1a1.pickle", "rb"))
It seems that there is an indecodable code in the file mnist-w1a1.pickle, or something like that.
Finally, I fixed the problem by setting the value "bytes" to the parameter encoding in the function pickle.load(), like that :
qnn = pickle.load(open("mnist-w1a1.pickle", "rb"), encoding="bytes")
Good to hear that it was a relatively straightforward fix. Could you make a pull request that incorporates this fix?
Finally, I fixed the problem by setting the value "bytes" to the parameter encoding in the function pickle.load(), like that :
qnn = pickle.load(open("mnist-w1a1.pickle", "rb"), encoding="bytes")
This proposal worked for me in the beginning, but the 5th module was not working due to "non-existing" 'thresholds' attributes. I finally solved the problem by using Python 2 kernel instead of Python 3 (I am using the 2.7.17 release). It seems to be a compatibility problem, but it can easily be solved. I hope this works for you @medric49 :)
Finally, I fixed the problem by setting the value "bytes" to the parameter encoding in the function pickle.load(), like that :
qnn = pickle.load(open("mnist-w1a1.pickle", "rb"), encoding="bytes")This proposal worked for me in the beginning, but the 5th module was not working due to "non-existing" 'thresholds' attributes. I finally solved the problem by using Python 2 kernel instead of Python 3 (I am using the 2.7.17 release). It seems to be a compatibility problem, but it can easily be solved. I hope this works for you @medric49 :)
Effectively, the last section doesn't work for me. Whether it's Python 2 or 3, it doesn't work. The attribute "thresholds" seems to be nonexistent. I am trying to fix it.
The problem is that, when the data of the neural network are loaded, this one doesn't consider the attributes created in its constructor, in fact these elements have not been saved. So, the qnn object just considers the skeleton of its class.
Effectively, the last section doesn't work for me. Whether it's Python 2 or 3, it doesn't work. The attribute "thresholds" seems to be nonexistent. I am trying to fix it.
So, any fix for this?