tensorflow
文章平均质量分 63
田野星
这个作者很懒,什么都没留下…
展开
-
tf.reduce_sum,tf.reduce_mean,tf.placeholder,tf.Variable
reduce_sum( input_tensor, axis=None, keep_dims=False, name=None, reduction_indices=None)1234567input_tensor:表示输入 axis:表示在那个维度进行sum操作。 keep_dims:表示是否保留原始数据的维度,False相当于执行完后原始数据就会少一个...原创 2018-05-21 20:08:09 · 189 阅读 · 0 评论 -
win10+RTX2080ti条件下配置tensorflow-gpu
1. 官网安装免费社区版的VS20172. 下载了Anaconda4.40,对应py363. 安装了CUDA10. https://developer.nvidia.com/cuda-downloads 安装时注意,选择自定义安装,并且在...原创 2019-01-07 20:18:21 · 4340 阅读 · 2 评论 -
关于循环调用Variable RNN的reuse问题
关于循环调用Variable RNN的reuse问题问题:Variable already exists原因解决问题:Variable already exists问题描述:Variable rnn/basic_lstm_cell/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AU...原创 2018-12-13 22:31:28 · 909 阅读 · 0 评论 -
cnn识别不定长英文验证码
本程序作为一个基础版的CNN使用教程,以识别简单的英文验证码作为目标完成一个简单的实例。在这个实例中,我们会涉及到以下三步,并通过这三部曲来带大家体验深度学习的魅力。仅2分,可直接运行的程序:https://download.csdn.net/download/qq_32791307/10651274 1. 对数据的基本读取、处理并生成batch 2. ...原创 2018-09-03 11:40:00 · 2392 阅读 · 0 评论 -
batch normalization
batch_normalization 有多种 tf.contrib.layers.batch_norm ,tf.nn.batch_normalization,tf.layers.batch_normalization ,tf.layers.BatchNormalization1. tf.contrib.layers.batch_normtf.contrib.layers.batc...翻译 2018-08-24 10:44:31 · 291 阅读 · 0 评论 -
CTPN在windows的CPU上运行经验
假设根目录在 C:\Users\uset\text-detection-ctpn-master 设置 "USE_GPU_NMS " 在文件 ./ctpn/text.yml as "False" 设置 "__C.USE_GPU_NMS" 在文件 ./lib/fast_rcnn/config.py 为 "False"; 注释掉 "from lib...原创 2018-08-01 09:43:02 · 4126 阅读 · 5 评论 -
多维数组转onehot编码
目的:随机生成的三维数组中,shape如(2,4,10)中,找到10(axis=2)中最大的数的索引,生成2维的索引数组。 将2维索引shape(2,4)中每个位置的值转成(2,4*10)的onehot编码。 如[[1,2,3,4],[2,1,4,3]]中的 4转为0000100000 ; 1转成 0100000000代码如下:import numpy ...原创 2018-07-12 12:55:53 · 1874 阅读 · 0 评论 -
tf.layers.dense
转自:https://blog.csdn.net/m0_37167788/article/details/79072681全连接层(dense)全连接dense层定义在 tensorflow/python/layers/core.py.1. 全连接层 tf.layers.densedense( inputs, units, activation=None, use_...转载 2018-07-10 11:33:13 · 1982 阅读 · 0 评论 -
tf.contrib.rnn.MultiRNNCell
文档:https://tensorflow.google.cn/api_docs/python/tf/contrib/rnn/MultiRNNCelltf.contrib.rnn.MultiRNNCell类 MultiRNNCell继承自: RNNCell别名:类 tf.contrib.rnn.MultiRNNCell类 tf.nn.rnn_cell.MultiRNNCell定义于tensorfl...翻译 2018-07-10 11:27:32 · 4375 阅读 · 0 评论 -
tf.sparse 和tf.contrib.layers.dense_to_sparse
tf.contrib.layers.dense_to_sparsetf.contrib.layers.dense_to_sparse( tensor, eos_token=0, outputs_collections=None, scope=None)定义于tensorflow/contrib/layers/python/layers/layers.py。将密集张量转换为稀...翻译 2018-07-10 10:56:11 · 2050 阅读 · 0 评论 -
记录tf.contrib.rnn.BasicLSTMCell
将所有tf.nn.rnn_cell更改为tf.contrib.rnn。Class tf.contrib.rnn.BasicLSTMCellClass tf.nn.rnn_cell.BasicLSTMCellArgs:num_units: int, The number of units in the LSTM cell.神经元数量forget_bias: float, The bias added...翻译 2018-06-02 16:13:27 · 5583 阅读 · 1 评论 -
tf.cast tf.argmax
tf.cast: 映射tf.cast(x, dtype, name=None)x:输入dtype:要映射的类型 如float32等name: 自己给定,随意例子:# tensor `a` is [1.8, 2.2], dtype=tf.float tf.cast(a, tf.int32) ==> [1, 2] # dtype=tf.int32 tf.argmax:输出最大的那个数值所在...原创 2018-05-22 16:53:02 · 315 阅读 · 0 评论 -
Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
这个问题是由于TF版本改变导致的问题需要:将此:loss = tf.nn.softmax_cross_entropy_with_logits(prediction,target_output)改为:loss = tf.nn.softmax_cross_entropy_with_logits(logits = prediction,labels = target_output)”...原创 2018-06-02 20:33:03 · 485 阅读 · 0 评论 -
无法加载训练好的.h5权重
Unable to open file (unable to open file: name = **.h5', errno = 2, error message = 'No such file or directory')确认模型是正确的情况下,最好的办法是升级h5py到最新版pip install h5py问题2:无法获取卷积参数,cudnn初始化失败首先试试关掉spyder或...原创 2019-03-04 17:00:28 · 1060 阅读 · 0 评论