def apiRun(params): model = models.RESNET50 params = common.validateParams(params) if params == None: return None, None return params, common.run( model, os.path.join(paths.MODELS, 'tensorflow', model, 'frozen_graph.pb'), params)
def apiRun(params): model = models.MOBILENET params = common.validateParams(params) if params == None: return None, None # FP32/FP16 use the TF->TFLite converted model mfw = 'tensorflow_lite' mfn = 'converted_model.tflite' # If INT8, switch to the PTIQ quantized model if params[const.PRECISION] == const.INT8: mfw = 'tensorflow_lite_quantised' mfn = 'quantised_PTIQ.tflite' fullpath = os.path.join(paths.MODELS, mfw, model, mfn) log.debug('Model location: %s' % fullpath) return params, common.run(model, fullpath, params)