ubuntu server 18.04使用tensorflow进行ddqn训练全过程

news2024/10/7 3:20:03

0. 前言

需要使用ddqn完成某项任务,为了快速训练,使用带有GPU的服务器进行训练。记录下整个过程,以及遇到的坑。

1. 选择模板代码

参考代码来源
GitHub
该代码最后一次更新是Mar 24, 2020。

环境配置:
python3.8
运行安装脚本:

apt-get update
apt-get install xvfb
apt-get install python-opengl
apt-get install python3-pip
python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/

安装python requirements
所需requirements文件

tensorflow
tensorlayer
opencv-python-headless
matplotlib
pyglet==1.5.27
gym==0.20.0
python -m pip install -r requirements -i https://pypi.tuna.tsinghua.edu.cn/simple/

运行模板代码

xvfb-run -s "-screen 0 1400x900x24" python double_DQN\ \&\ dueling_DQN.py

2. ubuntu 环境准备

本部分为踩坑记录,不需要跟着做

服务器之前有其他人用过,也可能是系统自带python,因此会有python环境,首先查看python版本

python --version

显示python命令对应的版本是2.7.17,之后查找该命令对应的符号链接文件位置。

which python

会显示python命令使用的符号链接文件

/usr/bin/python

查看该路径下还有没有其它python版本

ls -al | grep python

输出如下

lrwxrwxrwx  1 root   root           9 Apr 16  2018 python -> python2.7
lrwxrwxrwx  1 root   root           9 Apr 16  2018 python2 -> python2.7
-rwxr-xr-x  1 root   root     3628904 Nov 29 02:51 python2.7
lrwxrwxrwx  1 root   root           9 Jun 22  2018 python3 -> python3.6
-rwxr-xr-x  2 root   root     4526456 Nov 25 22:10 python3.6
-rwxr-xr-x  2 root   root     4526456 Nov 25 22:10 python3.6m
-rwxr-xr-x  1 root   root        1018 Oct 29  2017 python3-jsondiff
-rwxr-xr-x  1 root   root        3661 Oct 29  2017 python3-jsonpatch
-rwxr-xr-x  1 root   root        1342 May  2  2016 python3-jsonpointer
-rwxr-xr-x  1 root   root         398 Nov 16  2017 python3-jsonschema
lrwxrwxrwx  1 root   root          10 Jun 22  2018 python3m -> python3.6m

发现python命令使用的是2.7,但python3可以使用3.6。因为目前有的tensorflow版本不支持2.7了,先使用3.6.

接着查看tensorflow gpu各个版本的要求:官网。如下图所示,我选择了2.0.0,发布于2019年9月30日,和代码更新时间比较近,并且支持python 3.6。
在这里插入图片描述
准备使用pip安装tensorflow,但pip并没有安装,使用一下命令安装pip。

apt install python3-pip

之后执行安装命令

python -m pip install tensorflow-gpu==2.0.0

比较难受的是pip源中并没有2.0.0,换了清华源也没有,输出如下

Could not find a version that satisfies the requirement tensorflow-gpu==2.0.0 (from versions: 1.13.1, 1.13.2, 1.14.0, 2.12.0)
No matching distribution found for tensorflow-gpu==2.0.0

可以看到最新的版本只有2.12.0,那只能安装最新的版本。
还需要选择python版本,至少需要python3.7。我为了之后使用方便直接把python命令的软连接接入到新安装的python3.7上。

apt install python3.7
rm -f /usr/bin/python
ln -s /usr/bin/python3.7  /usr/bin/python
python --version

最后显示版本为3.7.5,替换成功,
这时候需要更新一下pip(后面装tensorflow的时候需要安装很多相关包,如果不升级pip的话会有很多包装不上,其中一个报错是 Failed building wheel for grpcio)。

python -m pip install --upgrade pip

继续安装tensorflow-gpu。

python -m pip install tensorflow-gpu

输出如下

The "tensorflow-gpu" package has been removed!
    
Please install "tensorflow" instead.

Other than the name, the two packages have been identical
since TensorFlow 2.1, or roughly since Sep 2019. For more
information, see: pypi.org/project/tensorflow-gpu

意思是tensorflow2.1之后gpu包没得了,直接pip install tensorflow就可以。(安装速度感人,切换清华源)

python -m pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple/

安装成功!!

3. 模板代码运行

本部分为踩坑记录,不需要跟着做

将代码下载到相应文件夹之后,可以使用如下语句运行ddqn模板代码。

python double_DQN\ \&\ dueling_DQN.py

当然会报很多no module的错误,使用pip依次安装,requirements总结如下

tensorlayer
opencv-python
opencv-python-headless
matplotlib
pyglet

将上述内容写文件,之后一键安装

python -m pip install -r requirments -i https://pypi.tuna.tsinghua.edu.cn/simple/

还需要安装gym,它是一个经常用于测试强化学习的示例,目前新的版本中获取新的状态时参数数量增加了,即以下语句会报错,step函数不仅输出变多了,而且s_的输出也不太正常。因此更换为早一点的版本。

s_,r,done,_ = self.env.step(a)

我根据模板代码的时间查看了gym的tag,发现时间上和模板代码相似,再打开gym的core文件查看step函数,果然从输出数量上合适的。进行安装:

python -m pip install gym==0.20.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/

报错如下:

Collecting gym==0.20.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f1/16/a421155206e7dc41b3a79d4e9311287b88c20140d567182839775088e9ad/gym-0.20.0.tar.gz (1.6 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

原因找了好久,从【参考】中找到了解决办法,更新为指定版本的setuptools:

python -m pip install --upgrade pip setuptools==57.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/

运行代码

python double_DQN\ \&\ dueling_DQN.py

发现pyglet最低要求python3.8。。。重新安装python3.8,之后直接使用requirements文件一键安装到新环境。

运行过程中报错

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/gym/envs/classic_control/rendering.py", line 27, in <module>
    from pyglet.gl import *
  File "/usr/local/lib/python3.8/dist-packages/pyglet/gl/__init__.py", line 47, in <module>
    from pyglet.gl.gl import *
  File "/usr/local/lib/python3.8/dist-packages/pyglet/gl/gl.py", line 7, in <module>
    from pyglet.gl.lib import link_GL as _link_function
  File "/usr/local/lib/python3.8/dist-packages/pyglet/gl/lib.py", line 98, in <module>
    from pyglet.gl.lib_glx import link_GL, link_GLX
  File "/usr/local/lib/python3.8/dist-packages/pyglet/gl/lib_glx.py", line 11, in <module>
    gl_lib = pyglet.lib.load_library('GL')
  File "/usr/local/lib/python3.8/dist-packages/pyglet/lib.py", line 134, in load_library
    raise ImportError(f'Library "{names[0]}" not found.')
ImportError: Library "GL" not found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "double_DQN & dueling_DQN.py", line 195, in <module>
    ddqn.train(200)
  File "double_DQN & dueling_DQN.py", line 161, in train
    if self.is_rend:self.env.render()
  File "/usr/local/lib/python3.8/dist-packages/gym/core.py", line 254, in render
    return self.env.render(mode, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/gym/envs/classic_control/cartpole.py", line 179, in render
    from gym.envs.classic_control import rendering
  File "/usr/local/lib/python3.8/dist-packages/gym/envs/classic_control/rendering.py", line 29, in <module>
    raise ImportError(
ImportError: 
    Error occurred while running `from pyglet.gl import *`
    HINT: make sure you have OpenGL installed. On Ubuntu, you can run 'apt-get install python-opengl'.
    If you're running on a server, you may need a virtual frame buffer; something like this should work:
    'xvfb-run -s "-screen 0 1400x900x24" python <your_script.py>'

最后说明了原因,缺少OpenGL 。并且在服务器上运行显示有点问题,就按照他给的解决方案处理。

apt-get install python-opengl
xvfb-run -s "-screen 0 1400x900x24" python double_DQN\ \&\ dueling_DQN.py

处理之后,再次报错

Traceback (most recent call last):
  File "double_DQN & dueling_DQN.py", line 195, in <module>
    ddqn.train(200)
  File "double_DQN & dueling_DQN.py", line 161, in train
    if self.is_rend:self.env.render()
  File "/usr/local/lib/python3.8/dist-packages/gym/core.py", line 254, in render
    return self.env.render(mode, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/gym/envs/classic_control/cartpole.py", line 229, in render
    return self.viewer.render(return_rgb_array=mode == "rgb_array")
  File "/usr/local/lib/python3.8/dist-packages/gym/envs/classic_control/rendering.py", line 126, in render
    self.transform.enable()
  File "/usr/local/lib/python3.8/dist-packages/gym/envs/classic_control/rendering.py", line 232, in enable
    glPushMatrix()
NameError: name 'glPushMatrix' is not defined

原因是pyglet版本太高,降为1.5.27即可。

4. 安装GPU支持

根据tensorflow版本选择cuda和cudnn。

4.1 安装cuda 11.2

wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run
chmod +x cuda_11.2.2_460.32.03_linux.run
sudo ./cuda_11.2.2_460.32.03_linux.run

安装完成后,需要将CUDA的路径添加到环境变量中。打开~/.bashrc文件,在文件末尾添加以下两行代码:

export PATH=/usr/local/cuda-11.2/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

然后运行以下命令使环境变量生效:

source ~/.bashrc

验证CUDA的安装是否成功。运行以下命令:

nvcc -V

4.2 安装cudnn 8.1

在NVIDIA官网下载。
之后上传到服务器,

tar -xzvf cudnn-11.2-linux-x64-v8.1.1.33.tgz
cp -P cuda/include/cudnn*.h /usr/local/cuda-11.2/include
cp -P cuda/lib64/libcudnn* /usr/local/cuda-11.2/lib64/
chmod a+r /usr/local/cuda-11.2/include/cudnn*.h /usr/local/cuda-11.2/lib64/libcudnn*

使用如下代码测试gpu是否正常使用

import tensorflow as tf

# 显示当前GPU设备信息
print(tf.config.list_physical_devices('GPU'))

# 创建一个TensorFlow的Session并在其中进行一个简单的运算
with tf.compat.v1.Session() as sess:
    # 创建一个TensorFlow的常量张量
    a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
    # 创建一个TensorFlow的变量张量
    b = tf.Variable(tf.random.normal([3, 2], stddev=0.1), name='b')
    # 进行矩阵乘法运算
    c = tf.matmul(a, b, name='c')

    # 初始化所有变量
    sess.run(tf.compat.v1.global_variables_initializer())

    # 运行TensorFlow图
    print(sess.run(c))

输出如下,可以正常使用

2023-03-05 14:43:55.699137: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F AVX512_VNNI FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-03-05 14:43:55.861866: I tensorflow/core/util/port.cc:104] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2023-03-05 14:43:56.628130: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.2/lib64
2023-03-05 14:43:56.628241: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.2/lib64
2023-03-05 14:43:56.628256: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
2023-03-05 14:43:58.016301: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-03-05 14:43:58.031069: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-03-05 14:43:58.032359: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
2023-03-05 14:43:58.035332: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F AVX512_VNNI FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-03-05 14:43:58.036833: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-03-05 14:43:58.038127: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-03-05 14:43:58.039367: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-03-05 14:43:59.106971: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-03-05 14:43:59.108369: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-03-05 14:43:59.109663: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-03-05 14:43:59.110894: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1613] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 30969 MB memory:  -> device: 0, name: Tesla V100S-PCIE-32GB, pci bus id: 0000:00:06.0, compute capability: 7.0
2023-03-05 14:43:59.127126: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:357] MLIR V1 optimization pass is not enabled
[[0.50951785 0.10452858]
 [1.070737   0.27480656]]

模板代码使用GPU加速感觉速度没快多少,可能是神经网络层数比较少的原因。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/389609.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

超全的命令(代码)执行漏洞无回显的姿势总结(附带详细代码和测试分析过程)

目录 漏洞代码 突破方式 重定向 dnslog外部通信 burpsuite burpcollaborator外部通信 日志监听 netcat监听 反弹shell的各种姿势 漏洞代码 <?php shell_exec($_GET[a]); ?>这里使用了无回显的shell执行函数shell_exec&#xff0c;给html目录的权限是777 突破方…

C++之多态 虚函数表

多态 多态是在不同继承关系的类对象&#xff0c;去调用同一函数&#xff0c;产生了不同的行为。 需要区分一下&#xff1a;1、菱形虚拟继承&#xff0c;是在继承方式前面加上virtual&#xff1b; class Person {}; class Student : virtual public Person {}; class Teacher…

【深蓝学院】手写VIO第2章--IMU传感器--笔记

0. 内容 1. 旋转运动学 角速度的推导&#xff1a; 左ω∧\omega^{\wedge}ω∧&#xff0c;而ω\omegaω是在z轴方向运动&#xff0c;θ′[0,0,1]T\theta^{\prime}[0,0,1]^Tθ′[0,0,1]T 两边取模后得到结论&#xff1a; 线速度大小半径 * 角速度大小 其中&#xff0c;对旋转矩…

Spring Security 实现自定义登录和认证(1):使用自定义的用户进行认证

1 SpringSecurity 1.1 导入依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-security</artifactId> </dependency>1.2 编写配置类 在spring最新版中禁用了WebSecurityConfigurerAdapter…

04-项目立项:项目方案、可行性分析、产品规划、立项评审

文章目录4.1 项目方案立项阶段4.2 可行性分析4.3 产品规划4.4 立项评审4.4.1 立项说明书的主要内容4.4.2 立项评审流程章节总结4.1 项目方案 学习目标&#xff1a; 能够输出产品项目方案 项目开发设计流程的主要阶段&#xff1a; 立项阶段 → 设计阶段 → 开发阶段 → 测试阶…

机器学习 | 实验一:线性回归

文章目录&#x1f4da;描述&#x1f4da;数据&#x1f4da;监督学习问题&#x1f4da;二维线性回归&#x1f4da;理解J(θ)⭐️对应笔记 单变量线性回归多变量线性回归 &#x1f4da;描述 第一个练习将提供线性回归练习。这些练习已经在Matlab上进行了广泛的测试。但它们也应该…

Spring Boot @Aspect 切面编程实现访问请求日志记录

aop切面编程想必大家都不陌生了&#xff0c;aspect可以很方便开发人员对请求指定拦截层&#xff0c;一般是根据条件切入到controller控制层&#xff0c;做一些鉴权、分析注解、获取类名方法名参数、记录操作日志等。 在SpringBoot中使用aop首先是要导入依赖如下&#xff1a; …

软工2023个人作业二——软件案例分析

项目内容这个作业属于哪个课程2023年北航敏捷软件工程这个作业的要求在哪里个人作业-软件案例分析我在这个课程的目标是学习并掌握现代软件开发和项目管理技术&#xff0c;体验敏捷开发工作流程这个作业在哪个具体方面帮助我实现目标从软件工程角度分析比较我们所熟悉的软件&am…

Doris集成Spark读写的简单示例

Doris集成Spark读写的简单示例 文章目录Doris集成Spark读写的简单示例0、写在前面1、Spark Doris Connector介绍2、基本示例2.1 提前准备表和数据2.2 新建项目2.3 使用SQL方式进行读写2.3.1 代码2.3.2 相关Error2.4 使用DataFrame方式读写数据&#xff08;**batch**&#xff09…

CS5261typec转HDMI|CS5260typec转VGA视频转换方案参考设计与PCB板开发

CS5261typec转HDMI|CS5260typec转VGA视频转换方案参考设计与PCB板开发 CS5261 CS5260分别是Type-C转HDMI或者VGA高性能 视频转换芯片&#xff0c;CS5261 是Type-C转HDMI 4K30HZ转换芯片 CS5260是Type-C转VGA 转换芯片。CS5261与CS5260两种芯片的功能和参数特性如下&#xff1…

热乎的面经——初出茅庐

⭐️前言⭐️ 本篇文章记录博主与2023.03.04面试上海柯布西公司&#xff0c;一面所被问及的面试问题&#xff0c;回答答案仅供参考。 &#x1f349;欢迎点赞 &#x1f44d; 收藏 ⭐留言评论 &#x1f4dd;私信必回哟&#x1f601; &#x1f349;博主将持续更新学习记录收获&am…

EdgeYOLO学习笔记

EdgeYOLO学习笔记 EdgeYOLO: An Edge-Real-Time Object Detector Abstract 本文基于最先进的YOLO框架&#xff0c;提出了一种高效、低复杂度、无锚的目标检测器&#xff0c;该检测器可以在边缘计算平台上实时实现。为了有效抑制训练过程中的过拟合&#xff0c;我们开发了一种…

git分支

分支什么是分支在版本控制过程中&#xff0c;同时推进多个任务&#xff0c;为每个任务&#xff0c;我们就可以创建每个任务的单独分支。使用分支意味着程序员可以把自己的工作从开发主线上分离开来&#xff0c;开发自己分支的时候&#xff0c;不会影响主线分支的运行。对于初学…

DOM型XSS

DOM型XSSDOM是什么DOM型XSSDOM型XSS实操DOM是什么 DOM就是Document。 文档是由节点构成的集合&#xff0c;在DOM里存在许多不同类型的节点&#xff0c;主要有&#xff1a;元素节点、文本节点&#xff0c;属性节点。 元素节点&#xff1a;好比< body >< p >< h …

Go语言函数高级篇

Go语言函数高级篇1.高阶函数函数作为参数函数作为返回值2.匿名函数3.defer4.内置函数1.高阶函数 高阶函数分为函数作为参数和函数作为返回值两部分。 函数作为参数 函数可以作为参数&#xff1a; package mainimport "fmt"func add(x, y int) int {return x y }…

论文解析[11] CAT: Cross Attention in Vision Transformer

发表时间&#xff1a;2021 论文地址&#xff1a;https://arxiv.org/abs/2106.05786v1 文章目录摘要3 方法3.1 总体结构3.1.1 Inner-Patch Self-Attention Block3.1.2 Cross-Patch Self-Attention Block3.1.3 Cross Attention based Transformer结论摘要 使用图像patch来替换tr…

【Servlet篇4】cookie和session

在这一篇文章当中&#xff0c;我们提到了什么是cookie和session。 【网络原理8】HTTP请求篇_革凡成圣211的博客-CSDN博客HTTP的常见属性&#xff0c;URL&#xff0c;User-Agent&#xff0c;Refer,get 和post的区别https://blog.csdn.net/weixin_56738054/article/details/1291…

[数据集][VOC][目标检测]河道垃圾水面漂浮物数据集目标检测可用yolo训练-1304张介绍

数据集格式&#xff1a;Pascal VOC格式(不包含分割路径的txt文件和yolo格式的txt文件&#xff0c;仅仅包含jpg图片和对应的xml) 图片数量(jpg文件个数)&#xff1a;1304 标注数量(xml文件个数)&#xff1a;1304 标注类别数&#xff1a;1 标注类别名称:["trash"] …

如何从错误中成长?

在上一篇文章“技术人的犯错成本”里&#xff0c;我和你聊了技术人可能会犯的各式各样的错误&#xff0c;也举了很多例子&#xff0c;说明了技术人犯错的成本。在竞争激烈的互联网时代&#xff0c;试错当然是好事&#xff0c;但了解错误成本&#xff0c;避免不应该犯的错误&…

测试概念及模型

今日目标掌握测试用例包含的基本内容使用等价类方法设计出测试用例1. 软件测试分类&#xff08;复习&#xff09;1.1 按阶段划分单元测试测试&#xff1a;针对单个功能进行测试&#xff0c;如&#xff1a;登录、购物车等开发&#xff08;更多的理解&#xff09;&#xff1a;针对…