Commit 9bcf561c authored by Patrick Wieschollek's avatar Patrick Wieschollek Committed by Yuxin Wu

Remove assert `len(self.input_names)` in `PredictConfig` (#754)

Some models do not need inputs during inference, e.g. GANs. However,
it was necessary to feed dummy-inputs although they are not needed.
parent 7167cf6d
......@@ -9,6 +9,7 @@ from ..graph_builder import ModelDescBase
from ..tfutils import get_default_sess_config
from ..tfutils.tower import TowerFuncWrapper
from ..tfutils.sessinit import SessionInit, JustCurrentSession
from ..utils import logger
__all__ = ['PredictConfig']
......@@ -79,7 +80,9 @@ class PredictConfig(object):
self.output_names = output_names
assert_type(self.output_names, list)
assert_type(self.input_names, list)
assert len(self.input_names), self.input_names
if len(self.input_names) == 0:
logger.warn('PredictConfig has no argument "input_names".')
# assert len(self.input_names), self.input_names
for v in self.input_names:
assert_type(v, six.string_types)
assert len(self.output_names), self.output_names
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment