tensorflow
candy134834
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Tensorflow serving No versions of servable <MODEL> found under base path
docker 部署模型,出现这个错误,运行命令,没有任何问题,发现原因,原来model_version是0.0.1然后 就会出现那个错误,改成1就没有任何问题了原创 2020-12-23 10:22:25 · 618 阅读 · 0 评论 -
builtins.ImportError: cannot import name ‘SparseFeat‘
是应为 我们安装deepctr,安装的是0.8版本,但是 0.8版本 接口发生了改动,具体见https://zhuanlan.zhihu.com/p/151009317因此from deepctr.inputs import SparseFeat,get_feature_names 改为from deepctr.feature_column import SparseFeat,get_feature_names...原创 2020-08-07 14:11:11 · 1835 阅读 · 1 评论 -
tf.gather()
import numpy as npimport tensorflow as tfsess=tf.InteractiveSession()a=tf.constant([5,5,6,6,3,3])b=tf.reshape(tf.range(6),(3,2))b=tf.tile(b,[2,3])sess.run(b)array([[0, 1, 0, 1, 0, 1], [...原创 2019-05-06 15:13:56 · 760 阅读 · 0 评论 -
jython 将py 文件变成 .class 文件
jython -m compileall tokenization.py 编译后的文件名字为 tokenization$py.classjython 如何安装 百度一下 下载 jython-installer-2.7.0.jar 直接双击就可以 安装原创 2019-01-24 13:33:00 · 1512 阅读 · 0 评论 -
tf.pad() 是再 不同的维度 进行填充
t = tf.constant([[1, 2, 3], [4, 5, 6]]) paddings = tf.constant([[1, 1,], [2, 2]]) tf.pad(t, paddings, "CONSTANT") <tf.Tensor 'Pad:0' shape=(4, 7) dtype=int32>sess=tf.InteractiveSession()...原创 2019-01-06 12:10:23 · 770 阅读 · 0 评论 -
解析 slim.arg_scope
def resnet_arg_scope(weight_decay=0.0001, is_training=True, batch_norm_decay=0.997, batch_norm_epsilon=1e-5, batc...原创 2019-01-06 11:02:45 · 1491 阅读 · 0 评论 -
cbam block and senet block
其实就是在 图像宽高上面重要性 图像宽高求要平均 最大 然后 相加 求sigmoid 然后 接着在 通道上面求重要性 通道数上面分别求平均 和 最大 然后相加 求sigmoidsenet 其实就是通道的重要性不同 ,感觉cbam和senet是不是有些相似 def cbam_block(input_feature, name, ratio=8): """Contains ...原创 2018-12-21 13:59:07 · 925 阅读 · 1 评论 -
VocabularyProcessor 使用注意事项
import codecsfrom tensorflow.contrib import learn import numpy as npraw1=["A person on a horse jumps over a broken down airplane.","A person is outdoors, on a horse."]raw2=["The boy does a skate...原创 2018-12-14 14:32:24 · 1565 阅读 · 0 评论 -
tensorboard无法显示的问题
a一般就是 tensorboard.exe没有加入到 系统变量path里面b启动tensorboard 是在anacoda prompt下面启动 不是cmdc 如果 http://localhost:6006 不能访问的话 加上 tensorboard --logdir=data --host=127.0.0.1这个问题困扰了好几天试了网上的各种方法:特此总结一下 :以下针对...原创 2018-09-06 10:17:03 · 3439 阅读 · 3 评论 -
tf.nn.softmax_cross_entropy_with_logits
https://blog.youkuaiyun.com/mao_xiao_feng/article/details/53382790# https://blog.youkuaiyun.com/zj360202/article/details/78582895# https://blog.youkuaiyun.com/shenxiaoming77/article/details/77050642tf.nn.softmax_...原创 2018-08-23 10:51:23 · 339 阅读 · 0 评论 -
tf.dynamic_rnn
参考 tensorflow高阶教程:tf.dynamic_rnnhttps://blog.youkuaiyun.com/lyg5623/article/details/73924506https://blog.youkuaiyun.com/lyg5623/article/details/73924506outputs, last_states = tf.nn.dynamic_rnn( cell=cell, ...原创 2018-07-20 21:57:43 · 435 阅读 · 0 评论 -
tf.expand_dims和tf.squeeze函数
https://blog.youkuaiyun.com/qq_31780525/article/details/72280284tf.expand_dims(tensor,axis=0) shape(tensor)为1时expand_dims 插入一个维度 就是插入数值1当shape(tensor)>=2是 expand_dims :就是在该维度的外面上增加一对中括号[] impor...原创 2018-07-29 07:40:58 · 886 阅读 · 0 评论 -
tf.nn.embedding_lookup用法
with tf.device('/cpu:0'):#一共5000个字 ,每个字用64维表示 embedding = tf.get_variable('embedding', [5000, 64]) embedding_inputs = tf.nn.embedding_lookup(embedding, self.input_x)#测试:...原创 2018-07-17 06:57:44 · 1714 阅读 · 0 评论
分享