zilongzhong / SSRN

This is a tensorflow and keras based implementation of SSRNs in the IEEE T-GRS paper "Spectral-Spatial Residual Network for Hyperspectral Image Classification: A 3-D Deep Learning Framework".
Other
211 stars 74 forks source link

IOError: Unable to create file #7

Open weixiaolian21 opened 6 years ago

weixiaolian21 commented 6 years ago

hello,when i run this code,the following error encountered. I don`t konw why. 2048/2055 [============================>.] - ETA: 0s - loss: 4.8819 - acc: 0.2090Epoch 00000: val_loss improved from inf to 4.92003, saving model to ./models/Indian_best_RES_3D_SS4_10_1.hdf5 Traceback (most recent call last): File "SSRN_IN.py", line 191, in nb_epoch=nb_epoch, shuffle=True, callbacks=[earlyStopping6, saveBestModel6]) File "/home/zhangxh/anaconda3/envs/py2/lib/python2.7/site-packages/keras/engine/training.py", line 1485, in fit initial_epoch=initial_epoch) File "/home/zhangxh/anaconda3/envs/py2/lib/python2.7/site-packages/keras/engine/training.py", line 1160, in _fit_loop callbacks.on_epoch_end(epoch, epoch_logs) File "/home/zhangxh/anaconda3/envs/py2/lib/python2.7/site-packages/keras/callbacks.py", line 75, in on_epoch_end callback.on_epoch_end(epoch, logs) File "/home/zhangxh/anaconda3/envs/py2/lib/python2.7/site-packages/keras/callbacks.py", line 400, in on_epoch_end self.model.save(filepath, overwrite=True) File "/home/zhangxh/anaconda3/envs/py2/lib/python2.7/site-packages/keras/engine/topology.py", line 2416, in save save_model(self, filepath, overwrite) File "/home/zhangxh/anaconda3/envs/py2/lib/python2.7/site-packages/keras/models.py", line 96, in save_model f = h5py.File(filepath, 'w') File "/home/zhangxh/anaconda3/envs/py2/lib/python2.7/site-packages/h5py/_hl/files.py", line 271, in init fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr) File "/home/zhangxh/anaconda3/envs/py2/lib/python2.7/site-packages/h5py/_hl/files.py", line 107, in make_fid fid = h5f.create(name, h5f.ACC_TRUNC, fapl=fapl, fcpl=fcpl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5f.pyx", line 98, in h5py.h5f.create IOError: Unable to create file (File locking disabled on this file system (use hdf5_use_file_locking environment variable to override), errno = 38, error message = 'function not implemented')

zilongzhong commented 6 years ago

It seems that this is an environment configuration problem. Make sure you set the conda environment exactly the same as this repo. For example, I use Anaconda 2 instead of Anaconda 3.