How to use the netron.worker.DataLoader 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 / Worker.py View on Github external
def __init__(self, api_url, mongo_uri, **kwargs):
        self.url = api_url
        self.name = socket.gethostname()
        self.http_client = AsyncHTTPClient()
        self.models = {"keras": KerasModel(**kwargs)}
        self.data_path = os.path.join(os.path.dirname(__file__), "data")
        self.data_loader = DataLoader(api_url, mongo_uri)
github yankov / netron / netron / worker / KerasModel.py View on Github external
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)