light_bulb
light_bulb copied to clipboard
Error at labeller.py and how to save the model?
Before all great work with light-bulb! I think there's a small error at:
unlabelled, ids = self.dataset.model_labelling_set()
if len(unlabelled) == 0:
self.logger.info("Model labelling done!")
scores = self.model.score(unlabelled)
As it's passing an empty list.
At this point I'm getting:
Traceback (most recent call last): File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/local/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/light-bulb/code/label_app.py", line 184, in threaded_label self.labeller.start() File "/light-bulb/code/labelling/labeller.py", line 63, in start scores = self.model.score(unlabelled) File "/light-bulb/code/models/cnn_model.py", line 151, in score return self.model.predict(x) File "/light-bulb/.virt/lib/python3.6/site-packages/keras/engine/training.py", line 1817, in predict check_batch_axis=False) File "/light-bulb/.virt/lib/python3.6/site-packages/keras/engine/training.py", line 113, in _standardize_input_data 'with shape ' + str(data_shape)) ValueError: Error when checking : expected input_5 to have 4 dimensions, but got array with shape (0,)
Just a continue or a break would work, but at this stage I was wondering if there's a save option so that I can get a model and use it at other system?
Best regards.