飞浆-aistudio无法使用

本文讲述了作者在使用PaddlePaddle库进行深度学习时遇到的问题,GPU无法直接使用且切换到1算卡后反而变得更慢,详细记录了CPU和不同算卡的性能变化。警告信息和依赖库的DeprecationWarning也揭示了可能存在的环境配置问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. 无法使用
    在这里插入图片描述
  2. 无法使用GPU,且速度很慢,
    感觉像是切换环境没有进行优化,gpu无法直接使用
    前后试过cpu的,1算卡的、0.5算卡的、1算卡的
    这样切换到最后,1算卡的变得更慢了。18分钟左右 batch 100,之前是6分钟 batch 100
    在这里插入图片描述
    在这里插入图片描述
/opt/conda/envs/python35-paddle120-env/lib/python3.7/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):
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/numba/types/__init__.py:110: DeprecationWarning: `np.long` is a deprecated alias for `np.compat.long`. To silence this warning, use `np.compat.long` by itself. In the likely event your code does not need to work on Python 2 you can use the builtin `int` for which `np.compat.long` is itself an alias. Doing this will not modify any behaviour and is safe. When replacing `np.long`, 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
  long_ = _make_signed(np.long)
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/numba/types/__init__.py:111: DeprecationWarning: `np.long` is a deprecated alias for `np.compat.long`. To silence this warning, use `np.compat.long` by itself. In the likely event your code does not need to work on Python 2 you can use the builtin `int` for which `np.compat.long` is itself an alias. Doing this will not modify any behaviour and is safe. When replacing `np.long`, 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
  ulong = _make_unsigned(np.long)
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/distributed/parallel.py:119: UserWarning: Currently not a parallel execution environment, `paddle.distributed.init_parallel_env` will not do anything.
  "Currently not a parallel execution environment, `paddle.distributed.init_parallel_env` will not do anything."
W0910 00:40:08.811192   191 device_context.cc:362] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 10.1
  1. 看起来cpu也无法使用
    在这里插入图片描述
### PaddlePaddle AI Studio 上的人脸识别教程与项目 #### 一、平台概述 PaddlePaddle 是由百度公司开源的一个深度学习框架,而AI Studio则是基于此框架构建的学习和实验环境。该平台提供了丰富的资源和支持,帮助开发者快速入门并深入研究各种机器学习模型。 #### 二、人脸识别教程概览 对于希望了解如何利用PaddlePaddle进行人脸识别的研究者来说,在AI Studio上有多个优质的教程可供参考[^1]: - **基础篇**:介绍基本概念和技术原理,适合初学者理解人脸识别的工作机制以及所需的数据预处理方法。 - **实战篇**:提供详细的代码实例说明怎样训练自己的人脸检测器,并将其部署到实际应用场景中去。例如,可以参照一些具体的案例来学习如何提取面部特征点位置信息,并计算出每个人脸的角度参数(即所谓的欧拉角),从而更好地定位和跟踪目标对象[^2]。 #### 三、具体操作指南 为了更直观地展示这一过程,下面给出一段简单的Python脚本作为示范,它展示了如何加载预训练好的神经网络模型来进行实时视频流中的多张面孔分析工作: ```python from paddlehub import Module import cv2 module = Module(name="ultra_light_fast_generic_face_detector_1mb") cap = cv2.VideoCapture(0) while True: ret, frame = cap.read() result = module.face_detection(images=[frame]) for face in result[0]['data']: box = list(map(int, face['box'])) # 绘制矩形框标记每一张检获的脸部区域 cv2.rectangle(frame,(box[0], box[1]), (box[2]+box[0], box[3]+box[1]), color=(0, 255, 0), thickness=2) # 显示其他属性如置信度分数等 text = f"{face['confidence']:.4f}" cv2.putText(frame,text ,(box[0], box[1]-10), fontFace=cv2.FONT_HERSHEY_SIMPLEX, fontScale=0.8,color=(0, 255, 0)) cv2.imshow('Video', frame) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows() ``` 这段代码实现了摄像头捕捉图像并通过`paddlehub`库调用预先训练过的轻量级通用人脸探测模块完成对画面内所有人脸的位置标注功能[^3]。 #### 四、更多高级特性探索 除了上述提到的基础功能外,还有许多值得进一步探讨的方向,比如结合虹软提供的API接口实现更加精准的身份验证服务;或是借助于百度AI开放平台所提供的云端服务能力简化本地开发流程等等[^4]。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值