KonstantinosF / Classification-of-Hyperspectral-Image

Classification of the Hyperspectral Image Indian Pines with Convolutional Neural Network
MIT License
188 stars 76 forks source link

IndexError while calculating the target in Validation_and_Classification_Maps.ipynb #3

Closed ombahiwal closed 5 years ago

ombahiwal commented 5 years ago

Index error is thrown, convert the calculated index to type int(), the expression actually returns float object. Please change it to -

target = int(y[int(i+PATCH_SIZE/2), int(j+PATCH_SIZE/2]))` outputs[int(i+PATCH_SIZE/2)][int(j+PATCH_SIZE/2/)] = prediction+1