Ошибка загрузки файла .mat с использованием scipy.io.loadmat для машинного обучения - PullRequest
0 голосов
/ 20 июня 2019

Итак, я скачал модель vgg19 по ссылке, предоставленной курсом Стэнфорда на Coursera (доверенная ссылка), проблема заключается в том, что когда я пытаюсь загрузить модель, используя

model = scipy.io.loadmat(filename)

выдает ошибку ОС не может прочитать байты

OSError                                   Traceback (most recent call last)
<ipython-input-10-fdeee51c535a> in <module>()
----> 1 model = sio.loadmat("imagenet-vgg-verydeep-19.mat")

2 frames
/usr/local/lib/python3.6/dist-packages/scipy/io/matlab/mio5.py in read_var_array(self, header, process)
    250            `process`.
    251         '''
--> 252         return self._matrix_reader.array_from_header(header, process)
    253 
    254     def get_variables(self, variable_names=None):

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.array_from_header()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.array_from_header()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_cells()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_mi_matrix()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.array_from_header()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_struct()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_mi_matrix()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.array_from_header()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_cells()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_mi_matrix()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.array_from_header()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_real_complex()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_numeric()

mio5_utils.pyx in scipy.io.matlab.mio5_utils.VarReader5.read_element()

streams.pyx in scipy.io.matlab.streams.ZlibInputStream.read_string()

streams.pyx in scipy.io.matlab.streams.ZlibInputStream.read_into()

OSError: could not read bytes

Я уверен, что ошибка не с файлом, потому что источник является доверенным. так что бы это могло быть? и я использую керасы, так есть ли способ загрузить модель, используя керасы вместо scipy?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...