自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 ImportError “No Module named Setuptools”

pip install --upgrade setuptoolspip uninstall setuptoolspip install setuptools

2019-03-07 10:12:10 461

原创 tf.nn.conv1d

tf.nn.conv1d(value, filters, stride, padding)value的形状:[batch, in_width, in_channels]batch 表示多少个样本 in_width 表示样本的宽度 in_channels 表示样本有多少个通道 可看作一个平铺开的二维数组:[batch, 行数, 列数];filter 的形状:[filter_widt...

2019-03-04 10:24:30 3922

原创 Anaconda安装指定版本的tensorflow

1)condainstall--channelhttps://conda.anaconda.org/anacondatensorflow=1.5.02)pip install tensorflow-gpu==1.4.0

2019-03-01 21:43:37 24875

原创 Anaconda安装tensorflow

创建环境conda create --name tensorflow python=3.5激活环境source activate tensorflow关闭环境source deactivate安装tensorflowanaconda search -t conda tensorflowanaconda show <USER/PACKAGE&gt...

2019-03-01 14:21:43 266

原创 No module named packaging

1.更新pip3pip3 install --upgrade pip2. 安装packagingpip3 install packaging

2019-02-28 10:46:57 21741

原创 conda command not found

安装成功后使用conda命令报错解决方案:echo 'export PATH="/home/your_name/anaconda3/bin:$PATH"' >> ~/.bashrcsource ~/.bashrc 

2018-11-01 14:14:37 513

转载 python中基本语法

#输入语句:>>> print'100+100=%d' %(100+100)100+100=200#输出语句>>> name = raw_input('input your name:')input your name:yinheyi>>> print('hello,%s' %name)hello,yinheyi 注...

2018-08-14 19:39:25 630

转载 Python 基本语法 list

list: Python内置的一种数据类型是列表。lists是一个有序的集合,可以添加与删除元素。生成它是用  []  就可以啦;调用它时,用下标调用就可以啦(从0开始);如第一个元素,list[0];倒数第一个,list[-1];可以用len()函数获得list元素的个数;在尾部添加用append(), 中间插入用insert();尾部删除用pop();指定位置删除为pop(i)...

2018-08-14 19:36:06 169

转载 Tensorflow tf.concat

tf.concat(values, axis)concat沿着某一维度链接tensor, 需要理解tensor 的维度 t1 = [[[1, 1, 1],[2, 2, 2]],[[3, 3, 3],[4, 4, 4]]] t2 = [[[5, 5, 5],[6, 6, 6]],[[7, 7, 7],[8, 8, 8]]] 第0维解释: t1和t2的0维是两个tensor最外层的两个...

2018-08-14 14:23:47 525

原创 TensorFlow 稀疏张量函数:tf.SparseTensor

稀疏张量表示:SparseTensor(indices=[[0, 0], [1, 2]], values=[1, 2], dense_shape=[3, 4])表示稠密张量:[[1, 0, 0, 0] [0, 0, 2, 0] [0, 0, 0, 0]]

2018-08-14 11:01:34 10074

转载 TensorFlow tf.split

tf.split( value, num_or_size_splits, axis=0, num=None, name='split' )这个函数是用来切割张量的。输入切割的张量和参数,返回切割的结果。 value传入的就是需要切割的张量。 这个函数有两种切割的方式:以三个维度的张量为例,比如说一个20 * 30 * 40的张量my_tensor,就如同一个长20厘米宽30厘米高40厘米...

2018-08-14 10:54:37 591

转载 TensorFlow tf.reshape

# tensor 't' is [1, 2, 3, 4, 5, 6, 7, 8, 9]# tensor 't' has shape [9]reshape(t, [3, 3]) ==> [[1, 2, 3], [4, 5, 6], [7, 8, 9]]# tensor 't' is [[[...

2018-08-14 09:42:47 180

原创 Python [-1]

a[-1] # last item in the array 倒数第一个值

2018-08-13 18:50:12 172

转载 Python 读写word

#coding=utf-8from docx import Documentfrom docx.shared import Ptfrom docx.shared import Inchesfrom docx.oxml.ns import qn#打开文档document = Document()#加入不同等级的标题document.add_heading(u'MS WORD写入测...

2018-07-28 11:06:30 6965 1

原创 PHP imagecopy()和imagecopyresized()

imagecopy()imagecopy() 函数用于拷贝图像或图像的一部分,成功返回 TRUE ,否则返回 FALSE 。bool imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h ) imagecopyr...

2018-07-20 21:19:05 1218

转载 php 查找字符串的首次出现strstr

strstr — 查找字符串的首次出现string strstr ( string $haystack , mixed $needle [, bool $before_needle = false ] ) <?php $email = 'yuxiaoxiao@example.com'; $domain = strstr($email, '@'); echo $domain; ...

2018-07-20 21:01:07 1862

原创 TensorFlow:ImportError: libcudnn.so.*: cannot open shared object file: No such file or dictionary

背景:Anaconda下安装的tensorflow完成后,import tensorflow报错:ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory 解决办法: 先到官网注册并下载相应的cudnn库(https://developer.nvidia.com/c...

2018-07-20 16:06:45 257

原创 python TensorFlow Anaconda Spyder

os.path.exists() 用于判断变量、文件等是否存在 Spyder1. 打开偏好设置 快捷键:Shift+Ctrl+Alt+P2. 设置字体/大小:General - Fonts3. 设置注释/代码颜色样式:Syntax Coloring...

2018-07-19 10:05:59 117

原创 【TensorFlow】tf.contrib.data.TFRecordDataset(filenames) 报错

报错:AttributeError: module 'tensorflow.contrib.data' has no attribute 'TFRecordDataset'在TensorFlow 1.3中,Dataset API是放在contrib包中的:tf.contrib.data.Dataset而在TensorFlow 1.4中,Dataset API已经从contrib包中...

2018-07-18 09:18:10 1882 1

原创 python 写入excel表格

# -*- coding: utf-8 -*-import xlwtbook = xlwt.Workbook(encoding='utf-8')sheet = book.add_sheet('sheet1', cell_overwrite_ok=True)sheet.write(0, 0, 'xxx')#写入中文txt='中文'sheet.write(0, 1, txt.deco...

2018-07-17 16:00:17 1190

原创 python读文件

file = open("xxx.txt")line = file.readline()while line != '':    #print line #具体操作    line = file.readline()file.close() 

2018-07-17 15:53:15 88

原创 Python字符串查找

find()方法:查找子字符串,若找到返回从0开始的下标值,若找不到返回-1info = 'abca'print info.find('a')##从下标0开始,查找在字符串里第一个出现的子串,返回结果:0info = 'abca'print info.find('a',1)##从下标1开始,查找在字符串里第一个出现的子串:返回结果3...

2018-07-17 15:47:46 329

空空如也

空空如也

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

TA关注的人

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