Thank you Salah! Your comment was useful, however I think that more important are the issues from scipy.io.matlab. I have installed h5py 2.6.0 and I think that hdf5 library is still working. But I'm not so sure and probably these problems are related to the hdf5 library, or matlab file meta_clsloc.mat. What's your idea about?
Il giorno lunedì 13 marzo 2017 20:44:27 UTC+1, Salah Rifai ha scritto: > > It's weird since all the numerator and denominator are both ints. Try > explicitly cast it to int: > > for ind in range(int(labels.size / batch_size)): > > Best, > > On Mon, Mar 13, 2017 at 2:51 PM, Goffredo Giordano <[email protected] > <javascript:>> wrote: > >> Thank you, but it doesn't modify nothing. The errors are the same. >> >> >> >> >> Il giorno lunedì 13 marzo 2017 17:12:06 UTC+1, Jesse Livezey ha scritto: >>> >>> You can probably modify line 27 in make_labels.py to be >>> for ind in range(labels.size // batch_size): >>> >>> This code was probably written with python 2 where division worked >>> differently. >>> >>> On Monday, March 13, 2017 at 8:45:39 AM UTC-7, Goffredo Giordano wrote: >>>> >>>> Hi, >>>> I'm a new user and I'm trying to study the ample world of machine >>>> learning. I would like to run the theano_alexnet training from >>>> https://github.com/uoguelph-mlrg/theano_alexnet. >>>> My computer is a Windows 10 native-machine 64 bit Intel core i7. I use >>>> WinPython-64bit-3.4.4.4QT5 from WinPython 3.4.4.3, Visual Studio 2015 >>>> Community Edition Update 3, CUDA 8.0.44 (64-bit), cuDNN v5.1 (August 10, >>>> 2016) for CUDA 8.0, Git source control based on MinGW compiler and >>>> OpenBLAS >>>> 0.2.14. >>>> As fundamental python libraries Theano is 0.9.0beta1 version, Scipy is >>>> 0.19.0, Keras 1.2.2, Lasagne 0.2.dev1, Numpy 1.11.1, hickle 2.0.4, h5py >>>> 2.6.0, pycuda, pylearn2, zeromq. >>>> I have downloaded the training images, the validation images and I have >>>> unzipped the development kit from Imagenet dataset. I have configured the >>>> paths.yaml with my folders but I do not know where I could find the >>>> val.txt >>>> and train.txt files. I used the meta_clsloc.mat file and >>>> ILSVRC2012_validation_ground_truth.txt file from the development kit from >>>> Imagenet dataset. With the Git bash control i try to run the >>>> generate_toy_data.sh and I can find the train_labels.npy, val_labels.npy, >>>> img_mean.npy, shuffled_train_filenames.npy with the validation alex net >>>> *.hkl files, but nothing in the training folder. Probably I forgot some >>>> important features, so I would apologize previously. Thank you so much! >>>> >>>> >>>> Goffredo_Giordano@Goffredo MINGW64 >>>> /c/deep_learning/alexnet/preprocessing >>>> $ sh generate_toy_data.sh >>>> ciao >>>> generating toy dataset ... >>>> make_hkl.py:72: >>>> VisibleDeprecationWarning: using a non-integer number instead of an >>>> integer >>>> will result in an error in the future >>>> hkl.dump(img_batch[:, :, :, :half_size], >>>> make_hkl.py:76: VisibleDeprecationWarning: using a non-integer number >>>> instead of an integer will result in an error in the future >>>> hkl.dump(img_batch[:, :, :, half_size:], >>>> Traceback (most recent call last): >>>> File "make_train_val_txt.py", line 26, in <module> >>>> synsets = scipy.io.loadmat(meta_clsloc_mat)['synsets'][0] >>>> File >>>> "C:\deep_learning\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\scipy\io\matlab\mio.py", >>>> >>>> line 136, in loadmat >>>> matfile_dict = MR.get_variables(variable_names) >>>> File >>>> "C:\deep_learning\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\scipy\io\matlab\mio5.py", >>>> >>>> line 272, in get_variables >>>> hdr, next_position = self.read_var_header() >>>> File >>>> "C:\deep_learning\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\scipy\io\matlab\mio5.py", >>>> >>>> line 226, in read_var_header >>>> mdtype, byte_count = self._matrix_reader.read_full_tag() >>>> File "scipy\io\matlab\mio5_utils.pyx", line 546, in >>>> scipy.io.matlab.mio5_utils.VarReader5.read_full_tag >>>> (scipy\io\matlab\mio5_utils.c:5330) >>>> File "scipy\io\matlab\mio5_utils.pyx", line 554, in >>>> scipy.io.matlab.mio5_utils.VarReader5.cread_full_tag >>>> (scipy\io\matlab\mio5_utils.c:5400) >>>> File "scipy\io\matlab\streams.pyx", line 164, in >>>> scipy.io.matlab.streams.ZlibInputStream.read_into >>>> (scipy\io\matlab\streams.c:3052) >>>> File "scipy\io\matlab\streams.pyx", line 151, in >>>> scipy.io.matlab.streams.ZlibInputStream._fill_buffer >>>> (scipy\io\matlab\streams.c:2913) >>>> zlib.error: Error -3 while decompressing data: invalid distance too far >>>> back >>>> make_labels.py:17: VisibleDeprecationWarning: using a non-integer >>>> number instead of an integer will result in an error in the future >>>> labels = labels[:labels.size / orig_batch_size * orig_batch_size] >>>> make_labels.py:23: VisibleDeprecationWarning: using a non-integer >>>> number instead of an integer will result in an error in the future >>>> labels_0 = labels.reshape((-1, batch_size))[::num_div].reshape(-1) >>>> make_labels.py:24: VisibleDeprecationWarning: using a non-integer >>>> number instead of an integer will result in an error in the future >>>> labels_1 = labels.reshape((-1, batch_size))[1::num_div].reshape(-1) >>>> Traceback (most recent call last): >>>> File "make_labels.py", line 125, in <module> >>>> div_labels(train_label_name, orig_batch_size, num_div) >>>> File "make_labels.py", line 27, in div_labels >>>> for ind in range(labels.size / batch_size): >>>> TypeError: 'float' object cannot be interpreted as an integer >>>> >>>> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "theano-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
