Open Zehui127 opened 7 years ago
Hi,
I also have same problem. no one find the solution ?
@Zehui127 @iamyup In cnn_mnist.py
and mlp_mnist.py
, The type of y_train
and y_test
need to be converted to int, since the index of array cannot be float. i.e., modify the code
y_train = mnist.target[:split]
y_test = mnist.target[split:]
to
y_train = mnist.target[:split].astype("int")
y_test = mnist.target[split:].astype("int")
@snowkylin I tried the solution you provided, but Im still getting the same error.
Traceback (most recent call last):
File "cnn_mnist.py", line 72, in :
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indices
Thanks for your great work I found some problem when running the example, I can't find the reason when running the above two example, the following error pop up:
I'm not sure why this happen.