waldeland / CNN-for-ASI

Tutorial: Convolutional Neural Networks for Automated Seismic Interpretation
Other
148 stars 79 forks source link

IndexError for iline #16

Closed ahmadbahaa closed 5 years ago

ahmadbahaa commented 5 years ago

Hello Mr Waldeland Your code is so amazing I want to say

I using CoLab to run the code however I got this error when I try to test my model :

> ####################################################################
> 
> Loading data cube from /content/gdrive/My Drive/cnn_for_ASI/F3/data.segy with:
>   Crosslines:  300 : 1249
>   Inlines:     276 : 476
>   Timeslices:  1 : 462
>  |----------------------------------------------------------------------------------------------------| 0.0%  - h min s left
>  |====================================================================================================| 100.0%  - 0h 0min 5s 
> Interpolating down sampled results to fit input cube
> Finished interpolating
> Writing interpretation to /content/gdrive/My Drive/cnn_for_ASI/F3/salt.segy
> ---------------------------------------------------------------------------
> IndexError                                Traceback (most recent call last)
> <ipython-input-12-d73513020e49> in <module>()
>      65 in_file = join(dataset_name, 'data.segy')
>      66 out_file = join(dataset_name, 'salt.segy')
> ---> 67 writeSEGY(out_file, in_file, classified_cube)
> 
> /content/data.py in writeSEGY(out_filename, in_filename, out_cube)
>      58         # loop through inlines and insert output
>      59         for i in src.ilines:
> ---> 60             iline = out_cube[i-iline_start,:,:]
>      61             src.iline[i] = np.ascontiguousarray(iline.astype(dtype))
>      62 
> 
> IndexError: invalid index to scalar variable.
> 
> ####################################################################

the code was running fine in my local PC but I don't have good GPU so I moved to CoLab, any suggestions to fix that error ???

thank you Ahmad Bahaa

ahmadbahaa commented 5 years ago

solved