The _initialize method in HubModule will soon be deprecated, you can use the __init__() to handle the initialization of the object
W1115 20:16:27.394336 6600 analysis_predictor.cc:1145] Deprecated. Please use CreatePredictor instead.
(NotFound) Cannot open file C:\Users\付佳强\.paddlehub\modules\animegan_v2_hayao_99\animegan_v2_hayao_99/__model__, please confirm whether the file is normal.
[Hint: Expected static_cast(fin.is_open()) == true, but received static_cast(fin.is_open()):0 != true:1.] (at D:\v2.0.2\paddle\paddle\fluid\inference\api\analysis_predictor.cc:915)
Traceback (most recent call last):
File "D:/重要内容/Python/机器学习/强化学习/PARL-develop/photo/picture.py", line 35, in
model = hub.Module(name='animegan_v2_hayao_99', use_gpu=False)
File "D:\重要内容\Python\爬虫2\venv\lib\site-packages\paddlehub\module\module.py", line 171, in __new__
module = cls.init_with_name(
File "D:\重要内容\Python\爬虫2\venv\lib\site-packages\paddlehub\module\module.py", line 274, in init_with_name
user_module._initialize(**kwargs)
File "D:\重要内容\Python\爬虫2\venv\lib\site-packages\paddlehub\compat\paddle_utils.py", line 220, in runner
return func(*args, **kwargs)
File "C:\Users\ \.paddlehub\modules\animegan_v2_hayao_99\module.py", line 24, in _initialize
self.model = Model(self.model_path, use_gpu)
File "C:\Users\ \.paddlehub\modules\animegan_v2_hayao_99\model.py", line 12, in __init__
self.predictor = self.load_model(modelpath, use_gpu)
File "C:\Users\ \.paddlehub\modules\animegan_v2_hayao_99\model.py", line 46, in load_model
predictor = create_paddle_predictor(config)
RuntimeError: Unknown exception
预测器读取权重报错了,或者定义预测器时就有错误,可能config里的值有错误