Exemplo n.º 1
0
    def test_trainer_without_optimizer(self, simple_model, loss):
        """ Tests if we can compile a Executor instance without an optimizer.
		"""
        simple_model.parse(None)
        simple_model.build()
        trainer = Executor(model=simple_model, loss=loss)
        trainer.compile()
Exemplo n.º 2
0
    def test_evaluator(self, simple_model):
        """ Tests if we can compile an Executor instance.
		"""
        simple_model.parse(None)
        simple_model.build()
        evaluator = Executor(model=simple_model)
        evaluator.compile()
Exemplo n.º 3
0
	def test_evaluator(self, simple_model):
		""" Tests if we can compile an Executor instance.
		"""
		simple_model.parse(None)
		simple_model.build()
		evaluator = Executor(
			model=simple_model
		)
		evaluator.compile()
Exemplo n.º 4
0
    def test_uber_test(self, uber_model, uber_data, jinja_engine, loss):
        """ Tests that we can compile and test a diverse model.
		"""
        uber_model.parse(jinja_engine)
        uber_model.register_provider(uber_data)
        uber_model.build()
        trainer = Executor(model=uber_model, loss=loss)
        trainer.compile()
        trainer.test(providers={'default': uber_data})
Exemplo n.º 5
0
    def test_uber_train(self, uber_model, uber_data, jinja_engine, loss,
                        optimizer):
        """ Tests that we can compile and train a diverse model.
		"""
        uber_model.parse(jinja_engine)
        uber_model.register_provider(uber_data)
        uber_model.build()
        trainer = Executor(model=uber_model, loss=loss, optimizer=optimizer)
        trainer.compile()
        trainer.train(provider=uber_data, stop_when={'epochs': 1})
Exemplo n.º 6
0
	def test_trainer_without_optimizer(self, simple_model, loss):
		""" Tests if we can compile a Executor instance without an optimizer.
		"""
		simple_model.parse(None)
		simple_model.build()
		trainer = Executor(
			model=simple_model,
			loss=loss
		)
		trainer.compile()
Exemplo n.º 7
0
	def test_uber_test(self, uber_model, uber_data, jinja_engine, loss):
		""" Tests that we can compile and test a diverse model.
		"""
		uber_model.parse(jinja_engine)
		uber_model.register_provider(uber_data)
		uber_model.build()
		trainer = Executor(
			model=uber_model,
			loss=loss
		)
		trainer.compile()
		trainer.test(providers={'default' : uber_data})
Exemplo n.º 8
0
    def test_uber_train(self, uber_model, uber_data, jinja_engine, loss,
                        optimizer):
        """ Tests that we can compile and train a diverse model.
		"""
        if uber_model.get_backend().get_name() == 'keras' and \
         uber_model.get_backend().keras_version() == 2 and \
         uber_model.get_backend().get_toolchain() == 'tensorflow' and \
         sys.version_info < (3, 5):
            pytest.skip('Occassional SIGSEGV')

        uber_model.parse(jinja_engine)
        uber_model.register_provider(uber_data)
        uber_model.build()
        trainer = Executor(model=uber_model, loss=loss, optimizer=optimizer)
        trainer.compile()
        trainer.train(provider=uber_data, stop_when={'epochs': 1})
Exemplo n.º 9
0
	def test_uber_train(self, uber_model, uber_data, jinja_engine, loss,
		optimizer):
		""" Tests that we can compile and train a diverse model.
		"""
		if uber_model.get_backend().get_name() == 'keras' and \
			uber_model.get_backend().keras_version() == 2 and \
			uber_model.get_backend().get_toolchain() == 'tensorflow' and \
			sys.version_info < (3, 5):
			pytest.skip('Occassional SIGSEGV')

		uber_model.parse(jinja_engine)
		uber_model.register_provider(uber_data)
		uber_model.build()
		trainer = Executor(
			model=uber_model,
			loss=loss,
			optimizer=optimizer
		)
		trainer.compile()
		trainer.train(provider=uber_data, stop_when={'epochs' : 1})