How to use the netron.models.KerasModelFactory function in netron

To help you get started, we’ve selected a few netron examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yankov / netron / netron / worker / KerasModel.py View on Github external
def __init__(self, exp_id, nb_epoch = 10, patience = 5, mongo_uri = "mongodb://localhost:27017/", data_filename = None):
        self.exp_id = exp_id
        self.model = None
        self.data = None
        self.data_loader = None

        # How many epoch to train (if score earlystopping doesn't kick in earlier)
        self.nb_epoch = nb_epoch

        # How many epoch of not improving before earlystopper kicks in
        self.patience = patience

        self.mongo_uri = mongo_uri

        self.factory = KerasModelFactory()

        self.data_loader = DataLoader("http://localhost:8080", self.mongo_uri)
github yankov / netron / netron / solvers / Solver.py View on Github external
def get_model_factory(self, model_type):
        if model_type == "keras":
            return KerasModelFactory()
        else:
            raise ValueError("%s is not supported. Only Keras models are supported right now." % model_type)