- 博客(39)
- 收藏
- 关注
原创 【已解决】huggingface错误:quests.exceptions.SSLError: HTTPSConnectionPool(host=‘huggingface.co‘, port=443):
gpt2-medium的(墙内huggingface镜像)加载方法。
2024-01-23 16:58:15
1769
1
原创 【已解决】NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver 的报错
基于ubuntu16.04,本人在更换一次系统下载源后,误操作进行了内核升级。出现NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver 的报错
2022-11-19 17:18:15
10218
1
原创 【光流提取】linux中MMLab dense_flow官方代码实现过程【已成功】
本文主要介绍使用基于GPU的OpenCV 提取视频的TV-L1光流。
2022-10-19 16:58:56
1914
9
转载 tf.name_scope() 和 tf.reset_default_graph用法说明
tf.name_scope() 和 tf.reset_default_graph用法说明
2022-09-16 22:33:52
216
原创 python中np.array的shape(2,)与shape(1 ,2)的运算细节
【代码】python中np.array的shape(2,)与shape(1 ,2)的运算细节。
2022-09-06 21:20:54
1387
原创 [pytorch] detach().clone().cpu().numpy() 操作解析
pytorch中tensor的直接赋值与clone()、numpy()PyTorch关于以下方法使用:detach() cpu() numpy()
2022-09-06 16:16:54
1143
原创 Python中sys.stdout.write和sys.stdout.flush的用法及说明
【代码】Python中sys.stdout.write和sys.stdout.flush的用法及说明。
2022-09-01 23:20:35
6682
转载 Python类中的继承——super(包含super(子类, self).__init__()以及其他父类的方法
Python类中的继承——super(包含super(子类, self).__init__()以及其他父类的方法
2022-08-30 16:10:56
253
原创 pytorch的图像预处理函数transforms
Pytorch:transforms的二十二个方法PyTorch】2.2 图像预处理——transforms
2022-08-24 22:09:44
849
转载 python 保存argparse配置参数
保存argparse配置参数重要的一步是将parser.parse_args()转换为字典,再输出key,value进行保存。
2022-08-24 10:25:09
998
原创 pytorch中cudnn.benchmark和cudnn.deterministic的作用
【代码】pytorch中cudnn.benchmark和cudnn.deterministic的作用。
2022-08-22 12:14:08
937
原创 random.seed和np.random.seed用法
在深度学习训练过程中,为帮保证算法的可复现,通常设置随机种子保证多次训练的随机变量一致。本blog通过一下测试代码,验证说明了两种。
2022-08-22 11:13:59
509
原创 tf.nn.sigmoid_cross_entropy_with_logits()函数示例
tf.nn.sigmoid_cross_entropy_with_logits()函数示例
2022-07-27 11:26:33
198
原创 t2n()函数 detach().cpu().numpy().astype(np.float)代码作用
detach(): 返回一个新的Tensor,但返回的结果是没有梯度的。cpu():把gpu上的数据转到cpu上。numpy():将tensor格式转为numpy。def t2n(t): return t.detach().cpu().numpy().astype(np.float)该端代码表示将tensor类型的变量t转换为numpy浮点型...
2022-04-19 19:49:25
983
原创 ubuntu中smbd服务搭建,ifcongfig命令没有IP地址
首先运行ifconfig -a确认你所选的网卡是否打开,如下图表示已经打开但并未分配IP地址若还未打开则需要运行:sudo ifconfig ens33 up来打开该网口接下来给打开的网口分配IP地址,运行sudo /sbin/dhclient即可随后在运行 ifconfig -a 即可查看新地址,如下图...
2021-09-22 10:33:02
235
原创 python matplot画图中文显示
程序定义前加入#解决中文显示问题plt.rcParams['font.sans-serif']=['Ubuntu']plt.rcParams['axes.unicode_minus'] = False可以显示中文
2021-05-11 11:25:27
290
原创 【pyqt5】实时显示程序运行日志输出,不用多线程
实时的运行结果输出: #用 button指向此函数 def printABCD(self): a = '*' for i in range(1,10000): text = '第' + str(i) + '次输入内容' + a * i + '\n' self.labelruning.append(text)#labelruning可以是文本部件或标签部件 QApplication.pro
2021-05-10 22:31:38
5224
原创 TypeError: input to a BitOp must have type (u)int8, (u)int16, (u)int32 or (u)int64 or be all bools n
在theano的loss设置中,对tensor操作出错TypeError: input to a BitOp must have type (u)int8, (u)int16, (u)int32 or (u)int64 or be all bools not float64原因符号错误:在tensor中将平方打为(^2),应为(**2)
2021-05-03 17:10:46
102
原创 ubuntu中 opencv cap.isOpened 输出总是false
@[TOC](opencv videocapture() 读取视频cap.isOpened 输出总是false)opencv videocapture读取视频cap.isOpened 输出总是false应该是视频本身的问题,换个视频就可以了
2021-04-14 01:57:39
2434
2
原创 Keras: int() argument must be a string, a bytes-like object or a number, not‘TensorVariable‘
num_frames_remaining=int(x.shape[1])运行结果TypeError: int() argument must be a string, a bytes-like object or a number, not'TensorVariable'原因分析:一、基本知识:keras内使用x.shape[0],比如返回的是32,这个32不是整数类型的,这里是dimension类型的,要使用这个32,需要int(x.shape[0])二、原因:在keras中提示错误如上
2021-04-02 11:39:57
2689
原创 theano tensor.stack函数
import theanoimport numpy as npimport theano.tensor as Tones = theano.shared(np.float32([[1,2,3],[4,5,6],[7,8,9]]))print(ones.get_value())result = T.stack([ones,ones],axis=0) #(第一维度拼接两个ones张量)print(result.eval())result = T.stack([ones,ones],ax.
2021-03-30 14:31:09
363
原创 TypeError: zeros() takes at most 3 arguments (4 given)
在执行如下程序时:reshape_frames = np.zeros(video_all_frames.shape[0],224,224,video_all_frames.shape[3]) 发生如下错误:TypeError: zeros() takes at most 3 arguments (4 given)原因分析:zeros函数定义为()zeros(shape, dtype=float, order='C')一重括号会使系统认为依次给 hape, dtype=float, o
2021-03-24 22:10:21
2165
原创 keras运行错误AttributeError: ‘str‘ object has no attribute ‘decode‘
keras运行过程出现如下错误:original_keras_version = f.attrs['keras_version'].decode('utf8')AttributeError: 'str' object has no attribute 'decode'方法:卸载重装不同版本pip uninstall h5pypip install h5py==2.10.0
2020-12-22 09:24:13
1507
5
原创 linux中opencv读取视频isopen返回false
环境Ubuntu16.04 。安装的opencv,python3.7cap.isOpened 输出false,出错原因在cv2.VideoCapture(filename)处。解决方法,运行:pip install opencv-contrib-python
2020-12-14 19:55:06
1759
1
原创 qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in “packages/cv2/qt/plugins
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/home/bit/.local/lib/python3.5/site-packages/cv2/qt/plugins” even though it was found.pyqt5安装过程中的问题出现错误qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/home/bit/.local/lib/pyt
2020-12-08 16:01:25
1401
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人