def __init__(self, weights_file: str, base_model_name: str):
    ' Invoke a predict method of this class to predict image quality using nima model\n        '
    try:
        self.nima = Nima(base_model_name, weights=None)
        self.nima.build()
        self.nima.nima_model.load_weights(weights_file)
    except Exception as e:
        print('Unable to load NIMA weights', str(e))
        sys.exit(1)
Invoke a predict method of this class to predict image quality using nima model
def __init__(self, weights_file: str, base_model_name: str):
    ' \n        '
    try:
        self.nima = Nima(base_model_name, weights=None)
        self.nima.build()
        self.nima.nima_model.load_weights(weights_file)
    except Exception as e:
        print('Unable to load NIMA weights', str(e))
        sys.exit(1)