
tensorflow
weixin_39012047
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
tensorflow1.0后函数变更(1)
1.AttributeError: 'module' object has noattribute 'random_crop'解决方案:将distorted_image= tf.image.random_crop(reshaped_image, [height, width])改为:distorted_image = tf.random_crop(reshaped_image,[hei...原创 2018-09-05 13:29:50 · 170 阅读 · 0 评论 -
tensorflow保存和加载模型
保存的结果:checkpoint files:二进制文件,保存了所有weights,biases,gradient and all the other variables的值。也就是上图中的.data-00000-of-00001和.index文件。.data文件包含了所有的训练变量。以前的TensorFlow版本是一个ckpt文件,现在就是这两个文件了。与此同时,Tensorflow还有一个...原创 2018-10-16 13:58:52 · 160 阅读 · 0 评论 -
Anaconda找包,安装包时,遇到PackageNotFoundError: ''Package missing in current channels"
Anaconda作为一个工具包集成管理工具,下载python工具包是很方便的,直接敲:conda install package_name1但是有时候安装一个工具包(如skimage)的时候,在当前的channels中找不到这个包,会提示:PackageNotFoundError: Packages missing in current channels: - skimage...转载 2018-10-18 11:20:17 · 1409 阅读 · 0 评论 -
tensorflow函数更名
tf.sub()更改为tf.subtract() tf.mul()更改为tf.multiply() tf.types.float32更改为tf.float32 tf.pact()更改为tf.stact() tf.neg 更改为tf.negative tf.train.SummaryWriter 改为:tf.summary.FileWriter tf.merge_all_summarie...原创 2018-10-26 17:39:33 · 266 阅读 · 0 评论 -
anaconda安装多个版本tensorflow切换
1.conda create -n tensorflow1.4 python=3.52.source activate tensorflow1.43.pip install tensorflow==1.44.导入环境配置相应的包5.conda remove -n tensorflow1.4 --all删除环境原创 2018-10-04 20:27:30 · 9235 阅读 · 0 评论 -
tensorflow部分函数的介绍(1)
1.concatimport tensorflow as tft1 = [[[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]]]with tf.Session() as sess:A = tf.concat(0, [t1, t2])B =...原创 2018-07-17 16:46:03 · 293 阅读 · 0 评论 -
tensorflow载入数据函数
在TensorFlow 1.3中,Dataset API是放在contrib包中的:tf.contrib.data.Dataset而在TensorFlow 1.4中,Dataset API已经从contrib包中移除,变成了核心API的一员:tf.data.Dataset...原创 2018-07-20 13:55:56 · 261 阅读 · 0 评论 -
tensorflow部分函数介绍(2)
1.collections.namedtuple():collections模块的namedtuple子类不仅可以使用item的index访问item,还可以通过item的name进行访问。可以将namedtuple理解为c中的struct结构,其首先将各个item命名,然后对每个item赋予数据。2.tf.reshape(tensor, shape, name=None) 函数的作用...原创 2018-07-24 19:18:10 · 253 阅读 · 0 评论 -
tensorflow函数变更(2)
错误:AttributeError: _parse_flags 在新版本中用FLAGS.flag_values_dict()代替原创 2018-09-06 13:51:37 · 837 阅读 · 0 评论 -
tensorflow中saver的使用
对于一般的深度学习模型来说,可能需要对程序运行期间的训练的参数结果进行保存,在tensorflow中提供了一个Saver类来实现这个功能:Saver提供了向checkpoints文件保存以及从checkpoints文件进行数据读取的的方法可以自动保存,同事可以设置保存最新的几个checkpoints文件 举例:saver.save(sess, checkpoint_dir + ...原创 2018-07-25 09:28:39 · 248 阅读 · 0 评论 -
tensorflow错误
1:tensorflow遇到的tf.nn没有属性sequence_loss问题tf.nn.seq2seq.sequence_loss_by_example变为tf.contrib.legacy_seq2seq.sequence_loss_by_exampletf.nn.rnn_cell. 变为tf.contrib.rnn.2:python TypeError: Expected in...原创 2018-12-28 10:06:13 · 324 阅读 · 0 评论