自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 资源 (1)
  • 收藏
  • 关注

原创 ndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C

plt.scatter(x.data.numpy(),y.data.numpy()) plt.plot(x.data.numpy(),prediction.data.numpy(),'r-',lw=5) plt.text(0.5,0,'Loss=%.4f' % loss.data[0],fontdict={'size':20,'color': 'red'}) plt.pause(0.1)

2023-03-09 20:03:15 185

原创 【无标题】解决TypeError: Module.__init__() takes 1 positional argument but 4 were given

TypeError: Module.__init__() takes 1 positional argument but 4 were given

2023-03-09 19:30:23 379

原创 解决UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xb1 in position 376: invalid start byte

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position 376: invalid start byte

2022-07-26 20:25:56 3069

原创 TypeError: not all arguments converted during string formatting

错误举例原因:1 % 操作符只能直接用于字符串(‘123’),列表([1,2,3])、元组,因此需要一一匹配操作符说明前后%和后面的参数数量不对应,修改

2022-04-19 09:09:38 576

原创 AttributeError: ‘NoneType‘ object has no attribute ‘copy‘解决方法

在做图片提取的时候发生了报错,查了好多说是图片读取路径有中文,看了一下发现我的路径也确实有中文,(图片为了方便就放在桌面上)。但是改了路径之后依然报错,仔细检查才发现是二点图片格式不对,保存到电脑格式是jpg.但原程序读取的是png.改了之后就可以正确运行。# import the necessary packagesimport matplotlib.pyplot as pltimport imutilsfrom imutils import perspectiveimport numpy

2021-12-20 20:44:01 13677

原创 PyTorch:The “freeze_support()“ line can be omitted if the program is not going to be frozen

RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase. This probably means that you are not using fork to start your child processes and you have for.

2021-12-15 19:55:20 1225

原创 PyTorch报错:ValueError: num_samples should be a positive integer value, but got num_samples=0

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Markdown编辑器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Mar

2021-12-13 21:47:12 849

原创 2021-10-26

win 10 下搭建 pytorch 环境一、本次安装所需的基本软件(分别搭建CPU和gpu 环境)1. Anaconda3-5.3.1-Windows-x86_642. pycharm-community-2019.3.43. python3.74. cuDNN 8.0.15. CUDA 10.2二、安装步骤先分别取官网下载python\Anaconda\pycharm,1、添加清华镜像源分别打进去conda config --add channels htt.

2021-10-26 20:06:45 172

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除