GeorgeSeif / Semantic-Segmentation-Suite

Semantic Segmentation Suite in TensorFlow. Implement, train, and test new Semantic Segmentation models easily!
2.5k stars 880 forks source link

Error during plotting when continuing training #182

Open TomasRiker opened 5 years ago

TomasRiker commented 5 years ago

I trained for 10 epochs (just to see if it works), then wanted to continue training for another 10 epochs:

train.py --num_epochs 20 --continue_training 1 --epoch_start_i 10

After the first epoch, the following error occurs during plotting:

Traceback (most recent call last):
  File "***\Semantic-Segmentation-Suite\train.py", line 308, in <module>
    ax1.plot(range(epoch+1), avg_scores_per_epoch)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\matplotlib\__init__.py", line 1710, in inner
    return func(ax, *args, **kwargs)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\matplotlib\axes\_axes.py", line 1437, in plot
    for line in self._get_lines(*args, **kwargs):
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\matplotlib\axes\_base.py", line 404, in _grab_next_args
    for seg in self._plot_args(this, kwargs):
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\matplotlib\axes\_base.py", line 384, in _plot_args
    x, y = self._xy_from_xy(x, y)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\matplotlib\axes\_base.py", line 243, in _xy_from_xy
    "have shapes {} and {}".format(x.shape, y.shape))
ValueError: x and y must have same first dimension, but have shapes (11,) and (1,)
ShalamovRoman commented 5 years ago

Hey, I have same problem. @TomasRiker, do you fix that?