コード例 #1
0
 def testFromContribEstimatorWithSessionConfig(self):
     estimator = testing_common.get_arithmetic_estimator(core=False)
     input_fn = testing_common.get_arithmetic_input_fn(core=False)
     predictor_factories.from_contrib_estimator(
         estimator,
         input_fn,
         output_alternative_key='sum',
         config=config_pb2.ConfigProto())
コード例 #2
0
 def setUp(self):
   model_dir = tempfile.mkdtemp()
   self._estimator = testing_common.get_arithmetic_estimator(
       core=False, model_dir=model_dir)
   self._prediction_input_fn = testing_common.get_arithmetic_input_fn(
       core=False, train=False)
コード例 #3
0
 def testFromCoreEstimatorWithContribEstimatorRaises(self):
   estimator = testing_common.get_arithmetic_estimator(core=False)
   input_fn = testing_common.get_arithmetic_input_fn(core=False)
   with self.assertRaises(TypeError):
     predictor_factories.from_estimator(estimator, input_fn)
コード例 #4
0
 def testFromCoreEstimator(self):
   estimator = testing_common.get_arithmetic_estimator(core=True)
   input_fn = testing_common.get_arithmetic_input_fn(core=True)
   predictor_factories.from_estimator(estimator, input_fn)
コード例 #5
0
 def testFromContribEstimator(self):
   estimator = testing_common.get_arithmetic_estimator(core=False)
   input_fn = testing_common.get_arithmetic_input_fn(core=False)
   predictor_factories.from_contrib_estimator(estimator, input_fn,
       output_alternative_key='sum')
コード例 #6
0
 def setUp(self):
   model_dir = tempfile.mkdtemp()
   self._estimator = testing_common.get_arithmetic_estimator(
       core=True, model_dir=model_dir)
   self._serving_input_receiver_fn = testing_common.get_arithmetic_input_fn(
       core=True, train=False)
コード例 #7
0
 def testFromCoreEstimatorWithSessionConfig(self):
     estimator = testing_common.get_arithmetic_estimator(core=True)
     input_fn = testing_common.get_arithmetic_input_fn(core=True)
     predictor_factories.from_estimator(estimator,
                                        input_fn,
                                        config=config_pb2.ConfigProto())
コード例 #8
0
 def testFromCoreEstimatorWithSessionConfig(self):
   estimator = testing_common.get_arithmetic_estimator(core=True)
   input_fn = testing_common.get_arithmetic_input_fn(core=True)
   predictor_factories.from_estimator(
       estimator, input_fn, config=config_pb2.ConfigProto())
コード例 #9
0
 def testFromContribEstimatorWithSessionConfig(self):
   estimator = testing_common.get_arithmetic_estimator(core=False)
   input_fn = testing_common.get_arithmetic_input_fn(core=False)
   predictor_factories.from_contrib_estimator(
       estimator, input_fn, output_alternative_key='sum',
       config=config_pb2.ConfigProto())
コード例 #10
0
 def setUp(self):
     model_dir = tempfile.mkdtemp()
     self._estimator = testing_common.get_arithmetic_estimator(
         core=False, model_dir=model_dir)
     self._prediction_input_fn = testing_common.get_arithmetic_input_fn(
         core=False, train=False)