mlModule/Predictor.py
def example_input_fn(self, generator):
        """ An example input function to pass to predict. It must take a generator as input """

        def _inner_input_fn():
#            dataset = tf.data.Dataset.from_generator(generator, output_types=(tf.int32, tf.float32)).batch(1)
            dataset = tf.data.Dataset.from_generator(generator, (tf.int32, tf.float32),(tf.TensorShape([None, 2]), tf.TensorShape(None))).batch(1)
            iterator = dataset.make_one_shot_iterator()
            features = iterator.get_next()
            return features, None

        return _inner_input_fn
 An example input function to pass to predict. It must take a generator as input 
An example input function to pass to predict. It must take a generator as input
An example input function to pass to predict . It must take a generator as input
def example_input_fn(self, generator):
        def _inner_input_fn():
            dataset = tf.data.Dataset.from_generator(generator, (tf.int32, tf.float32),(tf.TensorShape([None, 2]), tf.TensorShape(None))).batch(1)
            iterator = dataset.make_one_shot_iterator()
            features = iterator.get_next()
            return features, None
        return _inner_input_fn
def example_input_fn ( self , generator ) : def _inner_input_fn ( ) : dataset = tf . data . Dataset . from_generator ( generator , ( tf . int32 , tf . float32 ) , ( tf . TensorShape ( [ None , 2 ] ) , tf . TensorShape ( None ) ) ) . batch ( 1 ) iterator = dataset . make_one_shot_iterator ( ) features = iterator . get_next ( ) return features , None return _inner_input_fn
An example input function to pass to predict.
An example input function to pass to predict .
""" An example input function to pass to predict. It must take a generator as input """ #            dataset = tf.data.Dataset.from_generator(generator, output_types=(tf.int32, tf.float32)).batch(1)
self
generator