Don't warn of repeated data with one worker (#7175)

* Don't warn of repeated data with one worker

If there is only one worker there is no risk of duplicated data.

* Update training.py
Esse commit está contido em:
Dapid
2017-06-29 18:03:24 +02:00
commit de François Chollet
commit 5edd96a9f8
+12 -9
Ver Arquivo
@@ -1770,11 +1770,12 @@ class Model(Container):
for cbk in callbacks:
cbk.validation_data = val_data
is_sequence = isinstance(generator, Sequence)
if not is_sequence and use_multiprocessing:
if not is_sequence and use_multiprocessing and workers > 1:
warnings.warn(
UserWarning('Using a generator with `use_multiprocessing=True`'
' may duplicate your data.Please consider using '
'the `keras.utils.Sequence` class.'))
' and multiple workers may duplicate your data.'
' Please consider using the`keras.utils.Sequence'
' class.'))
enqueuer = None
try:
@@ -1920,11 +1921,12 @@ class Model(Container):
all_outs = []
batch_sizes = []
is_sequence = isinstance(generator, Sequence)
if not is_sequence and use_multiprocessing:
if not is_sequence and use_multiprocessing and workers > 1:
warnings.warn(
UserWarning('Using a generator with `use_multiprocessing=True`'
' may duplicate your data.Please consider using '
'the `keras.utils.Sequence` class.'))
' and multiple workers may duplicate your data.'
' Please consider using the`keras.utils.Sequence'
' class.'))
enqueuer = None
try:
@@ -2028,11 +2030,12 @@ class Model(Container):
wait_time = 0.01
all_outs = []
is_sequence = isinstance(generator, Sequence)
if not is_sequence and use_multiprocessing:
if not is_sequence and use_multiprocessing and workers > 1:
warnings.warn(
UserWarning('Using a generator with `use_multiprocessing=True`'
' may duplicate your data.Please consider using '
'the `keras.utils.Sequence` class.'))
' and multiple workers may duplicate your data.'
' Please consider using the`keras.utils.Sequence'
' class.'))
enqueuer = None
try: