IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
碰到的问题如上所示,这个问题其实是index的一个问题,而且主要是python2和python3会存在是否取整的问题,使用python3就特别容易出现index的问题,方法也很简单,强制转成int型就可以了
#test_acc[(it // test_interval)] = correct / 1e4test_acc[int((it//test_interval))]=correct/1e4问题解决!