def test_mobilenetv2_model(self): model = image_classifier.create(self.train_data, model_spec.mobilenet_v2_spec(), epochs=1, batch_size=1, shuffle=True) self._test_accuracy(model) self._test_predict_top_k(model) self._test_export_to_tflite(model) self._test_export_to_tflite_quantized(model, self.train_data) self._test_export_to_tflite_with_metadata(model) self._test_export_to_saved_model(model) self._test_export_labels(model)
def test_mobilenetv2_model_create_v1_incompatible(self): with self.assertRaisesRegex(ValueError, 'Incompatible versions'): _ = image_classifier.create(self.train_data, model_spec.mobilenet_v2_spec())