在运行“PaddleX快速上手-MobileNetV2图像分类 - 基于PaddleX的10分钟快速上手,对蔬菜数据集进行MobileNetV2分类。”时的出错信息。用AI studio在线运行时成功了。后来在本地设置了GPU环境并安装paddleX后再次尝试就会失败。已经把蔬菜图片数据集和MobileNetV2-pretrain从AI studio下载到本地。
D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddle\fluid\layers\utils.py:26: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
def convert_to_list(value, n, name, dtype=np.int):
[WARNING] pycocotools is not installed, detection model is not available now.
[WARNING] pycocotools install: https://paddlex.readthedocs.io/zh_CN/develop/install.html#pycocotools
D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddle2onnx\onnx_helper\mapping.py:42: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
int(TensorProto.STRING): np.dtype(np.object)
D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddle2onnx\constant\dtypes.py:43: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
np.bool: core.VarDesc.VarType.BOOL,
D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddle2onnx\constant\dtypes.py:44: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
core.VarDesc.VarType.FP32: np.float,
D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddle2onnx\constant\dtypes.py:49: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
core.VarDesc.VarType.BOOL: np.bool
2021-05-03 17:43:45 [INFO] Starting to read file list from dataset...
2021-05-03 17:43:45 [INFO] 840 samples in file D:\Education\Projects\vegetable_cls\vegetables_cls.tar\vegetables_cls\train_list.txt
2021-05-03 17:43:45 [INFO] Starting to read file list from dataset...
2021-05-03 17:43:46 [INFO] 240 samples in file D:\Education\Projects\vegetable_cls\vegetables_cls.tar\vegetables_cls/val_list.txt
D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddle\fluid\framework.py:687: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
elif dtype == np.bool:
2021-05-03 17:43:51 [INFO] Connecting PaddleHub server to get pretrain weights...
W0503 17:43:51.461038 9652 device_context.cc:362] Please NOTE: device: 0, GPU Compute Capability: 5.0, Driver API Version: 10.2, Runtime API Version: 10.2
W0503 17:43:51.481093 9652 device_context.cc:372] device: 0, cuDNN Version: 7.6.
2021-05-03 17:43:54 [INFO] Load pretrain weights from output/mobilenetv2\pretrain\MobileNetV2_x1.0.
Traceback (most recent call last):
File "main.py", line 32, in <module>
model.train(num_epochs=10,
File "D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddlex\cv\models\classifier.py", line 197, in train
self.net_initialize(
File "D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddlex\cv\models\base.py", line 253, in net_initialize
paddlex.utils.utils.load_pretrain_weights(
File "D:\Robin\Anaconda3\envs\paddle_env\lib\site-packages\paddlex\utils\utils.py", line 258, in load_pretrain_weights
raise Exception("File {} is not a paddle parameter file".format(
Exception: File output/mobilenetv2\pretrain\MobileNetV2_x1.0 is not a paddle parameter file