Python
Python相关内容
香菜烤面包
To be better.
展开
-
解决报错SyntaxError: Non-ASCII character ‘\xe8‘ in file predict.py on line 1, but no encoding declared
报错SyntaxError: Non-ASCII character '\xe8' in file predict.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details原创 2023-07-03 14:24:07 · 3100 阅读 · 0 评论 -
Ubuntu20.04已安装python3.8和python3.6,安装python3.7并设置使用3.7版本pip
Ubuntu上安装了python3.8和python3.6,安装python3.7并设置使用3.7版本pip原创 2023-06-27 11:10:47 · 2621 阅读 · 0 评论 -
十大经典排序算法解析及其代码实现
排序算法是最基本的算法之一,排序算法可以分为内部排序和外部排序,内部排序是数据记录在内存中进行排序,常见的内部排序算法有:插入排序、希尔排序、选择排序、冒泡排序、归并排序、快速排序、堆排序、基数排序等。原创 2023-05-15 20:00:08 · 563 阅读 · 0 评论 -
torch.Tensor常用数据操作汇总与自动求梯度
torch.Tensor常用数据操作汇总与自动求梯度原创 2023-04-22 10:43:30 · 1485 阅读 · 2 评论 -
TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device
TypeError: empty() received an invalid combination of arguments原创 2023-04-12 17:43:19 · 4995 阅读 · 2 评论 -
使用sklearn.metrics时报错:ValueError: Target is multiclass but average=‘binary‘.
ValueError: Target is multiclass but average='binary'. Please choose another average setting, one of [None, 'micro', 'macro', 'weighted'].原创 2023-04-12 17:32:45 · 1079 阅读 · 0 评论 -
深度学习中的随机初始化种子random.seed()与参数初始化
深度学习中的随机初始化种子random.seed()与参数初始化原创 2022-12-04 23:16:54 · 6618 阅读 · 0 评论 -
ValueError: File format b‘\x00\x00\x00\x14‘ not understood. Only ‘RIFF‘ and ‘RIFX‘ supported.
ValueError: File format b'\x00\x00\x00\x14' not understood. Only 'RIFF' and 'RIFX' supported.原创 2023-04-07 15:51:20 · 2762 阅读 · 4 评论 -
Python 中从 List 中删除重复项的五种方法
Python 中从 List 中删除重复项的五种方法原创 2023-03-15 18:53:15 · 1657 阅读 · 0 评论 -
MacOS Python报错:ModuleNotFoundError: No module named ‘keras‘
MacOS Python报错:ModuleNotFoundError: No module named 'keras'原创 2023-03-03 17:30:53 · 838 阅读 · 0 评论 -
Python List / Numpy / Tensor相互转换
Python List / Numpy / Tensor相互转换原创 2022-12-26 11:38:17 · 377 阅读 · 0 评论 -
PyTorch thop包计算模型Params和FLOPs
PyTorch thop包计算模型Params和FLOPs原创 2022-12-26 11:03:11 · 1080 阅读 · 0 评论 -
Python下载第三方库报错Read timed out.
Python下载第三方库报错Read timed out.原创 2022-12-20 22:34:12 · 299 阅读 · 0 评论 -
SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \UX
Python报错原创 2022-12-20 22:32:30 · 132 阅读 · 0 评论 -
PyTorch logit函数
PyTorch logit函数原创 2022-12-19 15:50:34 · 1248 阅读 · 0 评论 -
PIL库与OpenCV库读取图片的区别
PIL库与OpenCV库读取图片的区别原创 2022-12-12 21:17:51 · 388 阅读 · 0 评论 -
Python 可变对象与不可变对象
Python 可变对象与不可变对象原创 2022-12-11 01:39:23 · 2389 阅读 · 0 评论 -
Python os.mkdir与os.makedirs的区别
os.mkdir与os.makedirs的区别原创 2022-12-11 01:38:28 · 507 阅读 · 0 评论 -
利用Python调用cmd
利用Python调用cmd原创 2022-12-11 01:50:06 · 1332 阅读 · 0 评论 -
场景检测库pyscenedetect
场景检测通过检测视频中镜头之间的转换,自动将视频镜头分割成多个场景原创 2022-12-10 12:23:02 · 3295 阅读 · 0 评论 -
Python 多进程与多线程
Python 多进程与多线程原创 2022-12-10 12:15:40 · 1306 阅读 · 0 评论 -
Python python_speech_features库
Python python_speech_features库原创 2022-12-10 12:15:17 · 685 阅读 · 0 评论 -
Python wave库
Python wave库原创 2022-12-09 15:30:30 · 3615 阅读 · 0 评论 -
MacOS创建TensorFlow虚拟环境(conda)
MacOS创建TensorFlow虚拟环境(conda)原创 2022-12-09 15:04:53 · 393 阅读 · 0 评论 -
python -m pip install 和 pip install 安装包的区别
python -m pip install 和 pip install 安装包的区别原创 2022-12-09 14:52:18 · 1047 阅读 · 3 评论 -
cv2.error: Unknown C++ exception from OpenCV code
cv2.error: Unknown C++ exception from OpenCV code原创 2022-12-09 14:49:42 · 1912 阅读 · 2 评论 -
MacOS安装PyAudio
MacOS安装PyAudio原创 2022-12-09 14:47:44 · 967 阅读 · 0 评论 -
Python randint左闭右闭,range左闭右开!
Python randint左闭右闭,range左闭右开!原创 2022-12-08 23:35:03 · 1540 阅读 · 0 评论 -
如何从github上克隆库、跑库
如何从github上克隆库、跑库原创 2022-12-07 09:53:34 · 3343 阅读 · 0 评论 -
TypeError: load_state_dict() missing 1 required positional argument: ‘state_dict‘
TypeError: load_state_dict() missing 1 required positional argument: 'state_dict'原创 2022-12-07 09:52:24 · 1737 阅读 · 0 评论 -
无法通过PyCharm上传代码到服务器:could not list the contents of folder
无法通过PyCharm上传代码到服务器:could not list the contents of folder原创 2022-12-06 09:48:29 · 664 阅读 · 1 评论 -
easy_install: command not found
easy_install: command not found原创 2022-12-06 09:44:35 · 1495 阅读 · 0 评论 -
ImportError: libGL.so.1: cannot open shared object file: No such file or dir
ImportError: libGL.so.1: cannot open shared object file: No such file or dir原创 2022-12-06 09:41:37 · 9837 阅读 · 2 评论 -
Python安装cv2
Python安装cv2原创 2022-12-06 09:31:03 · 400 阅读 · 0 评论