自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 资源 (21)
  • 收藏
  • 关注

原创 Pytorch数据读取加速方法

1. 方法一:使用prefetcherclass data_prefetcher(): def __init__(self, loader): self.loader = iter(loader) self.stream = torch.cuda.Stream() self.mean = torch.tensor([0.485 * 255, 0.456 * 255, 0.406 * 255]).cuda().view(1,3,1,1)

2020-08-20 10:38:23 22221 4

原创 Pytorch 模型查看参数

def count_parameters(model): return sum(p.numel() for p in model.parameters() if p.requires_grad)print("模型的参数量", count_parameters(model))print("model",model)from torchsummary import summaryprint(summary(model, (input_data.shape[1])))...

2020-08-18 17:34:40 1485

原创 python sys.getsizeof 变量的大小

# 671MBa=np.ones(shape=(2000,44000),dtype=np.float)import syssys.getsizeof(a)/1024/1024

2020-08-18 11:24:06 2895

原创 两种背包问题(递归,python)

书包容量为 C, 每个物品对应重量wi和 vi ,求可拥有的最大价值,每个商品只有一个。递归解决:def backage(C,weight_list,value_list,now_value): # 剩下容量,目前商品,目前的价格,目前拥有的价值 if C<=0 or len(weight_list) ==0: return now_value if C < min(weight_list): return now_value

2020-08-13 20:55:35 9120

原创 Pytorch cannot allocate memory 解决内存不足问题

del X_train, y_train, X_valid, y_validgc.collect()torch.cuda.empty_cache()# torch.cuda.clear_memory_allocated() # entirely clear all allocated memory

2020-08-08 13:20:45 5448

原创 numpy含nan值进行归一化操作

1. 方法一import numpy as npA = np.array([[ 7, 4, 5, 7000], [ 1, 900, 9, nan], [ 5, -1000, nan, 100], [nan, nan, 3, 1000]])#Compute NaN-normsL1_norm = np.nansum(np.abs(A), axis=1)L2_norm =

2020-08-07 17:34:28 1367

原创 Pytorch学习率调整策略StepLR

CLASStorch.optim.lr_scheduler.StepLR(optimizer, step_size, gamma=0.1, last_epoch=-1, verbose=False)>>> # lr = 0.05 if epoch < 30>>> # lr = 0.005 if 30 <= epoch < 60>>> # lr = 0.0005 if 60 <= epoch < 90

2020-08-07 06:55:41 14772

原创 Python决策树的可视化

# Fit the classifier with default hyper-parametersclf = DecisionTreeClassifier(random_state=1234)model = clf.fit(X, y)text_representation = tree.export_text(clf)print(text_representation)from dtreeviz.trees import dtreeviz # remember to load the pack

2020-08-06 17:46:29 3793 2

原创 GLU, sparsemax, GELU激活函数

2. sparsemaxSoftmax:softmax缺点:每个向量位置都有值。文章From Softmax to Sparsemax:A Sparse Model of Attention and Multi-Label Classification 提出了能够输出稀疏概率的Sparsemax。这里把输入 z 和某个分布 p 的欧式距离最小化。一种具体的实现是,参考:论文;...

2020-08-06 14:54:34 13889

python程序设计(浙江大学).rar

python程序设计PPT(浙江大学python课件)对应慕课该课程PPT。 包含9章内容: python语言介绍; 语句; 字符串,列表,元组; 集合,字典; 函数,命名空间和作用域; 文件读写操作; Web应用; 网络爬虫;等

2020-10-22

从FM到FFM.pdf

美团技术团队的FM各类模型分析,侵删。

2020-04-27

tennessee-eastman21Faults.rar

TE过程数据 d00.dat ~ d21.dat 以及 d00_te.dat ~ d21_te.dat

2019-06-13

使用AutoEncoder实现语音增强.pptx

使用AutoEncoder实现语音增强.pptx,15页PPT内容;使用AutoEncoder实现语音增强.pptx

2018-12-29

生成对抗网络画猫python

使用对抗神经网络来画猫.pptx; 以及对应的生成对抗网络代码。 使用对抗神经网络来画猫.pptx; 以及对应的生成对抗网络代码。 使用对抗神经网络来画猫.pptx; 以及对应的生成对抗网络代码。

2018-12-25

变分自编码器python代码

generate.py; model.py; train.py; read.py四个代码文件,实现vae。

2018-12-25

深度卷积生成对抗网络TensorFlow代码实现

Tensorflow implementation of [Deep Convolutional Generative Adversarial Networks](http://arxiv.org/abs/1511.06434) which is a stabilize Generative Adversarial Networks.

2018-12-25

深度学习与自然语言处理

2018年发布的,由佐治亚理工学院交互计算学院副教授Jacob Eisenstein编写的深度学习与自然语言处理的教材。 LEARNING;SEQUENCES and TREES;MEANING

2018-12-13

人工智能Nilsson(中文版)

人工智能(中文版 nils nilsson).pdf 人工智能: 英文版- 尼尔森, Nils J. Nilsson

2018-11-26

python qt gui快速编程PyQt编程指南 pdf扫描版及随书源代码源码.zip

PYTHON QT GUI快速编程---PYQT编程指南》,其英文原版书名为:《Rapid GUI Programming with Python and Qt》PDF扫描版; 包括随书源代码。

2018-03-04

Windows直接安装版本redis-3

Windows直接安装版本redis-3.2 64位 下载后解压缩,直接运行安装。

2018-01-30

MySQL编译文件直接下载安装mysqlclient-1.3.7-cp35-none-win_amd64.whl

MySQL编译文件直接下载安装mysqlclient-1.3.7-cp35-none-win_amd64.whl 只使用于python3.5! 其他python需要相应版本的。

2018-01-28

visual studio 黑色主题

visual studio 黑色主题,适用于各个版本,直接导入配置即可。 dark-vision.vssettings

2018-01-25

C程往年试卷2000-2010年

C程往年试卷2000-2010年 ZJU C程往年试卷2000-2010年

2018-01-14

Python for Probability,Statistics,and Machine Learning.pdf

Python for Probability,Statistics,and Machine Learning.pdf Python for Probability,Statistics,and Machine Learning.pdf

2018-01-11

机器学习实战随书代码machine learning in action

机器学习实战随书代码machine learning in action随书代码;CH02-CH15

2017-12-19

TensorFlow_ Large-Scale Machine Learning

TensorFlow_ Large-Scale Machine Learning on Heterogeneous Distributed Systems.pdf )

2017-12-17

数据结构基础期末考试 2005-2012.7z

数据结构基础期末考试 2005-2012 Final Exam of Fundamentals of Data Structures 2012-2013.pdf Final Exam of Fundamentals of Data Structures 2011-2012.pdf etc

2017-12-09

小波变换详解及应用2页PPT

小波变换 在这一章中,我们介绍小波转换。最近几年来,有一种方法被使 用在分解信号方面,而此方法就是小波转换,为什么我们需要这个方 法去分解信号呢?为了去回答这个问题,我们先来看看另一种对分析信 号的标准工具-傅立叶转换(Fourier transform)。

2017-11-27

C++编写的图书馆管理系统

使用C++编写 的图书馆管理系统。 void ViewBook(ook &amp;boo;,lend &amp;Lin;); void ViewCard(ook &amp;boo;,lend &amp;Lin;)等还几个类。

2017-11-22

arduinoTimerOneLibrary_v1.1.0

The library provides two objects — Timer1 and TimerRTC — to manipulate different hardware timers as follows.

2017-11-08

空空如也

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

TA关注的人

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