Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train model #32

Closed
Leila-sd opened this issue Jun 30, 2019 · 3 comments
Closed

train model #32

Leila-sd opened this issue Jun 30, 2019 · 3 comments

Comments

@Leila-sd
Copy link

Hi, I successfully run it on the samples images using your pretrained model. Now i'm trying to retrain the models using your code but get this error:
Using Theano backend.
/home/kntu/anaconda3/lib/python3.6/site-packages/keras/backend/theano_backend.py:1282: UserWarning: DEPRECATION: the 'ds' parameter is not going to exist anymore as it is going to be replaced by the parameter 'ws'.
mode='max')
/home/kntu/anaconda3/lib/python3.6/site-packages/keras/backend/theano_backend.py:1282: UserWarning: DEPRECATION: the 'st' parameter is not going to exist anymore as it is going to be replaced by the parameter 'stride'.
mode='max')
/home/kntu/anaconda3/lib/python3.6/site-packages/keras/backend/theano_backend.py:1282: UserWarning: DEPRECATION: the 'padding' parameter is not going to exist anymore as it is going to be replaced by the parameter 'pad'.
mode='max')
/home/kntu/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Compiling SAM-ResNet
Training SAM-ResNet
Epoch 1/10
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/kntu/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/kntu/anaconda3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/kntu/anaconda3/lib/python3.6/site-packages/keras/engine/training.py", line 425, in data_generator_task
generator_output = next(generator)
File "main.py", line 46, in generator
Y_fix = preprocess_fixmaps(fixs[counter:counter + b_s], shape_r_out, shape_c_out)
File "/home/kntu/LS/new_sam/sam-master/sam-master/utilities.py", line 106, in preprocess_fixmaps
fix_map = scipy.io.loadmat(path)["I"]
KeyError: 'I'

Traceback (most recent call last):
File "main.py", line 97, in
ModelCheckpoint('weights.sam-resnet.{epoch:02d}-{val_loss:.4f}.pkl', save_best_only=True)])
File "/home/kntu/anaconda3/lib/python3.6/site-packages/keras/engine/training.py", line 1417, in fit_generator
'or (x, y). Found: ' + str(generator_output))
Exception: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None
thanks.

@marcellacornia
Copy link
Owner

Hi @Leila-sd,
sorry for the late reply.

Our training code is compatible with images coming from the SALICON dataset, where both saliency density map and fixation map are provided for each image. The error you reported seems to be related to the lack of fixation maps.

@Leila-sd
Copy link
Author

Leila-sd commented Jul 20, 2019

Thanks for your consideration.

@Leila-sd
Copy link
Author

Leila-sd commented Jul 31, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants