KGPML / Hyperspectral

Deep Learning for Land-cover Classification in Hyperspectral Images.
http://kgpml.github.io/Hyperspectral/
GNU General Public License v3.0
298 stars 137 forks source link

TypeError: 'float' object cannot be interpreted as an integer #17

Open saikosis opened 5 years ago

saikosis commented 5 years ago

I have taken patch_size=21 in the "patch_size.py" file (as suggested in the README.md) and the length of train_patches are obtained as follows: 100

Now upon running the following code I get the error as given below: 101

What should I do?

Sravani-Kalangi commented 5 years ago

Here on division you are getting a float, so to convert it into int just make it as:

for j in range(int(COUNT/(len(TRAIN_PATCH[i])))):

You will get multiple such errors just do so subsequently.