自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(39)
  • 收藏
  • 关注

原创 【已解决】huggingface错误:quests.exceptions.SSLError: HTTPSConnectionPool(host=‘huggingface.co‘, port=443):

gpt2-medium的(墙内huggingface镜像)加载方法。

2024-01-23 16:58:15 1085

原创 ubuntu 16.04安装neofetch查看电脑配置

ubuntu 16.04安装neofetch查看电脑配置

2022-11-21 15:09:23 798 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 10093

原创 【已成功】Ubuntu 16.04 built-in display分辨率较低的解决方法

亲测可行

2022-11-16 15:01:26 936

原创 【光流提取】linux中MMLab dense_flow官方代码实现过程【已成功】

本文主要介绍使用基于GPU的OpenCV 提取视频的TV-L1光流。

2022-10-19 16:58:56 1509 9

原创 tensorflow conv2d 函数解释

【代码】tensorflow conv2d 函数解释。

2022-10-04 20:37:32 326

转载 tf.name_scope() 和 tf.reset_default_graph用法说明

tf.name_scope() 和 tf.reset_default_graph用法说明

2022-09-16 22:33:52 154

转载 tf.placeholder作用

tf.placeholder作用

2022-09-16 20:59:14 171

原创 python中np.array的shape(2,)与shape(1 ,2)的运算细节

【代码】python中np.array的shape(2,)与shape(1 ,2)的运算细节。

2022-09-06 21:20:54 1315

原创 [pytorch] detach().clone().cpu().numpy() 操作解析

pytorch中tensor的直接赋值与clone()、numpy()PyTorch关于以下方法使用:detach() cpu() numpy()

2022-09-06 16:16:54 1075

原创 python torch.optim模块

本篇笔记主要介绍torch.optim模块,主要包含模型训练的优化器Optimizer。

2022-09-02 12:08:06 1635

原创 Python中sys.stdout.write和sys.stdout.flush的用法及说明

【代码】Python中sys.stdout.write和sys.stdout.flush的用法及说明。

2022-09-01 23:20:35 6337

转载 Python类中的继承——super(包含super(子类, self).__init__()以及其他父类的方法

Python类中的继承——super(包含super(子类, self).__init__()以及其他父类的方法

2022-08-30 16:10:56 191

原创 详解PyTorch项目使用TensorboardX进行训练可视化

详解PyTorch项目使用TensorboardX进行训练可视化

2022-08-30 11:56:43 319

原创 pytorch的图像预处理函数transforms

Pytorch:transforms的二十二个方法PyTorch】2.2 图像预处理——transforms

2022-08-24 22:09:44 827

转载 python 保存argparse配置参数

保存argparse配置参数重要的一步是将parser.parse_args()转换为字典,再输出key,value进行保存。

2022-08-24 10:25:09 883

原创 python 参数传递 *args,**kwargs说明

【代码】python 参数传递 *args,**kwargs说明。

2022-08-23 22:05:42 262

原创 pytorch中cudnn.benchmark和cudnn.deterministic的作用

【代码】pytorch中cudnn.benchmark和cudnn.deterministic的作用。

2022-08-22 12:14:08 839

原创 random.seed和np.random.seed用法

在深度学习训练过程中,为帮保证算法的可复现,通常设置随机种子保证多次训练的随机变量一致。本blog通过一下测试代码,验证说明了两种。

2022-08-22 11:13:59 471

原创 python 将输出打印到文件

python将输出打印到文件。

2022-07-30 13:28:52 4205

原创 python 实时输出运行进度条

python实时输出运行进度条。

2022-07-30 13:25:31 795

原创 python中 numpy f.view(‘f8,f8,f8,f8‘)函数说明

view函数参数

2022-07-27 23:32:39 617

原创 tf.nn.sigmoid_cross_entropy_with_logits()函数示例

tf.nn.sigmoid_cross_entropy_with_logits()函数示例

2022-07-27 11:26:33 159

原创 np.slipt()函数的用法说明及举例

如果是一个整数,就用该数平均切分,如果是一个数组,为沿轴切分的位置(左开右闭)

2022-07-25 17:38:08 259

原创 where 函数筛选位置,并进行矩阵内容修改/索引获取

where函数筛选位置,并进行矩阵内容修改。

2022-07-25 11:13:34 164

原创 np.where的用法示例

np.where(condition)用法

2022-07-22 15:18:12 142

原创 tensorflow关于get_tensor_by_name的理解

代码:tensorflow关于get_tensor_by_name的理解。

2022-07-21 16:14:12 1314

原创 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 917

原创 ubuntu中smbd服务搭建,ifcongfig命令没有IP地址

首先运行ifconfig -a确认你所选的网卡是否打开,如下图表示已经打开但并未分配IP地址若还未打开则需要运行:sudo ifconfig ens33 up来打开该网口接下来给打开的网口分配IP地址,运行sudo /sbin/dhclient即可随后在运行 ifconfig -a 即可查看新地址,如下图...

2021-09-22 10:33:02 184

原创 python matplot画图中文显示

程序定义前加入#解决中文显示问题plt.rcParams['font.sans-serif']=['Ubuntu']plt.rcParams['axes.unicode_minus'] = False可以显示中文

2021-05-11 11:25:27 242

原创 【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 5013

原创 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 89

原创 ubuntu中 opencv cap.isOpened 输出总是false

@[TOC](opencv videocapture() 读取视频cap.isOpened 输出总是false)opencv videocapture读取视频cap.isOpened 输出总是false应该是视频本身的问题,换个视频就可以了

2021-04-14 01:57:39 2266 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 2588

原创 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 329

原创 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 2019

原创 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 1455 4

原创 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 1605 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 1283 1

空空如也

空空如也

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

TA关注的人

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