重写facenet出现的问题:
来源:互联网 发布:沪深300股指期货 知乎 编辑:程序博客网 时间:2024/06/04 18:18
重写facenet出现的问题:
1. Shape must be rank 0 but is rank 1 for ‘SGD/GradientDescent/update_conv1_3/kernel/ApplyGradientDescent’ (op: ‘ApplyGradientDescent’) with input shapes: [3,3,3,32], [1], [3,3,3,32].
learning_rate = tf.placeholder(shape=(1,), dtype=tf.float32, name='learning_rate')optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(total_loss)
上述问题出现的原因是learning_rate 为tensor, 将learning_rate 改为scalar 常数值即可
2. Input 0 is incompatible with layer flatten_1: expected min_ndim=3, found ndim=2
当keras域tensorflow混用时可能出现这种情况
3. W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: You must feed a value for placeholder tensor ‘conv1_bn/keras_learning_phase’ with dtype bool
当keras域tensorflow混用时可能出现这种情况
[[Node: conv1_bn/keras_learning_phase = Placeholderdtype=DT_BOOL, shape=, _device=”/job:localhost/replica:0/task:0/gpu:0”]]
我的最终解决方案为如下
K.set_learning_phase(1)
下面为其他参考方案:(如果后面内容为 dtype=DT_UINT8 )
K._LEARNING_PHASE = tf.constant(0) # try with 1
change it to its below: (add K.learning_phase())
pred = K.function([model.input], [model.output])pred = K.function([model.input, K.learning_phase()], [model.output])
阅读全文
0 0
- 重写facenet出现的问题:
- Facenet
- URL重写后提交表单出现的问题
- FaceNet--Google的人脸识别
- FaceNet--Google的人脸识别
- FaceNet--Google的人脸识别
- FaceNet--Google的人脸识别
- FaceNet--Google的人脸识别
- FaceNet--Google的人脸识别
- FaceNet--Google的人脸识别
- panel重写碰到的问题
- 重写组件遇到的问题
- Magento的URL重写问题
- 重写DrawItem遇到的问题
- 重写的Dialog显示问题
- Apache路径重写的问题
- cell重写layoutSubviews的问题
- C#的窗体重写问题
- org.apache.ibatis.exceptions.PersistenceException
- Python爬虫实战(四) :下载煎蛋网所有妹子照片
- Activity传递Binder给Fragment
- 04.结构体之bmp文件头
- 51nod算法马拉松28划水记
- 重写facenet出现的问题:
- 记2017.09.04美图笔试
- bat 复制文件到指定目录
- JQuery制作四种简易的动画效果
- unsupervised learning
- HashSet集合是如何做到存储元素唯一,没有重复元素的呢?
- mysql的注入问题(1)
- python好博客
- NYOJ 236 心急的C小加