1、将利用tf.slice函数提取cost_volume的部分都去掉。在生成cost_volume的部分取消和Disparity相关的那次迭代。
实验结果:运行正常,且不同的cost_volume的权值不再相同,达到预期效果。遗留的还不清楚原因。问题是训练的效果还很差,而且整体的像素值都很小。
2、实验:将get_batch函数中的per_picture_standarlization去掉。看看能不能使得像素强度大一些
部分像素结果如下:.
[[[ 1.54285169 0.933927 1.47258127]
[ 0.18207826 0.22060575 0.08451674]
[ 1.03088057 0.11117508 0.19160177]
...,
[ 0.35692829 0.32839873 0.16750905]
[ 1.05116034 0.13198015 0.36493447]
[ 0.2625978 0.20416011 0.12823176]]
[[ 0.3860575 0.20895129 0.265073 ]
[ 0.0403722 0.03014125 0.00384803]
[ 0.0151044 0.07537584 0.01479994]
...,
[ 0.04567728 0.05214696 0.01129383]
[ 0.02521723 0.13180308 0.0209306 ]
[ 0.02408953 0.0227813 0.00365678]]
[[ 1.027174 0.61219567 0.23092042]
[ 0.04974696 0.02318765 0.00461498]
[ 1.00026262 0.04449522 0.01210062]
...,
[ 0.16489761 0.1579753 0.04708993]
[ 1.00086021 0.07266132 0.01164706]
[ 0.06365518 0.03242689 0.00899804]]
可以看到像素大小还是非常小,不知道是不是训练不够的问题。
3、实验三:将输出的大小乘以100,试着看看视觉效果。
可以看到效果已经不是非常规律的方格,说明每一个权重都在学习,但是还是出现了很多很规则的点点,不知道是为什么。
4 将输出的dispary乘以300再看看视觉效果.,
5、 现在将训练集从viz_flow_occ改回disp_noc_0,并且将输出通道改回单通道,看看深度图结果是否有进步。
部分实验结果如下:
[[ 3.40333544e-02 5.69506519e-05 2.48991432e-06 ..., 4.63277753e-03
2.80782206e-05 3.48242669e-04]
[ 4.70794330e-05 3.34092731e-09 9.17497883e-11 ..., 1.76127151e-06
2.62155764e-09 4.37388223e-08]
[ 2.87549233e-06 1.52223467e-09 1.26440701e-13 ..., 9.30134411e-06
6.21862700e-11 2.40355167e-08]
...,
[ 5.11044115e-02 9.99674085e-05 7.98715919e-04 ..., 3.29265208e-06
2.07200878e-06 6.11510040e-05]
[ 1.36528717e-04 3.21911784e-07 8.04712919e-09 ..., 1.33634458e-05
1.05197735e-08 2.18457217e-06]
[ 5.79223561e-04 2.78921561e-07 2.23914014e-07 ..., 7.12920810e-05
6.08705761e-07 3.78783056e-06]]
[[ 1.85363144e-02 6.05983842e-05 2.08838060e-06 ..., 3.23573872e-03
1.32183186e-05 2.73108453e-04]
[ 2.73683308e-05 3.24031557e-09 2.81839191e-10 ..., 1.11970405e-06
1.10107701e-09 3.00957836e-08]
[ 1.27066949e-06 8.96879571e-10 7.00045152e-14 ..., 6.33006402e-06
1.63468891e-11 9.96947325e-09]
可以看到,输出的预测值非常的小,感觉还是存在问题的。
6,将实验结果乘以30000输出,希望得到一个可视化效果。
dispmap=dispmap*30000
[[ 3.40333544e-02 5.69506519e-05 2.48991432e-06 ..., 4.63277753e-03
2.80782206e-05 3.48242669e-04]
[ 4.70794330e-05 3.34092731e-09 9.17497883e-11 ..., 1.76127151e-06
2.62155764e-09 4.37388223e-08]
[ 2.87549233e-06 1.52223467e-09 1.26440701e-13 ..., 9.30134411e-06
6.21862700e-11 2.40355167e-08]
结果依旧很小,不知道是不是自己设置出问题了
7,将学习率退化率更改为每20个epoch退化一次
8,我明明已经在disparity输出之前乘以了一个很大的输300000,但是神经网络还是将我的值强行的拉到了很小,我怀疑不是网络训练的问题,而是视差的训练标签根本就不能够进行标准化。
9,我准备做一个实验,看看tf.image.per_image_standardization函数对数值的影响。
代码如下:
import os
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt#这个可以用来
from tensorflow.python.training import moving_averages
from tensorflow.python.ops import control_flow_ops
from tflearn.layers.conv import global_avg_pool
import operator
from PIL import Image
import time#record runing time
"""
Created on Sat Oct 6 11:02:20 2018
@author: Administrator
"""
groundtruth_dir = 'E:/study/graduate_document/my_densematching_program/train//disp_noc_0//000058_10.png'
image_contents_left=tf.read_file(groundtruth_dir)
image_left=tf.image.decode_png(image_contents_left,channels=3)
image_left = tf.image.resize_image_with_crop_or_pad(image_left, IMG_H,IMG_W)
image_left_stand = tf.image.per_image_standardization(image_left)
image_left_float32 = tf.cast(image_left, tf.float32)
image_left_stand_float=tf.cast(tf.image.per_image_standardization(image_left), tf.float32)
f = open("DATA2.txt", "w") #将值输出来看一下
f2 = open("DATA3.txt", "w") #将值输出来看一下
f3 = open("DATA4.txt", "w") #将值输出来看一下
f4=open("DATA5.txt", "w") #将值输出来看一下
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.7 # 占用GPU90%的显存
config.allow_soft_placement=True
config.log_device_placement=True
with tf.Session(config=config) as sess:
img1,img2,img3,img4=sess.run([image_left,image_left_stand,image_left_float32,image_left_stand_float])
plt.imshow(img1)
plt.show()
print(img2,file=f)
plt.imshow(img2)
plt.show()
print(img2,file=f2)
plt.imshow(img3)
plt.show()
print(img3,file=f3)
plt.imshow(img4)
plt.show()
print(img4,file=f4)
f.close()
f2.close()
f3.close()
f4.close()
图像效果如下:
原始图像的灰度值如下:
[[[ 0 0 0]
[ 0 0 0]
[ 0 0 0]
...,
[ 0 0 0]
[ 0 0 0]
[ 0 0 0]]
[[ 0 0 0]
[ 0 0 0]
[ 0 0 0]
...,
[ 0 0 0]
[ 0 0 0]
[ 0 0 0]]
[[ 0 0 0]
[ 0 0 0]
[ 0 0 0]
...,
[ 0 0 0]
[ 0 0 0]
[ 0 0 0]]
...,
[[14 14 14]
[14 14 14]
[15 15 15]
...,
[16 16 16]
[17 17 17]
[16 16 16]]
[[ 0 0 0]
[ 0 0 0]
[15 15 15]
...,
[17 17 17]
[17 17 17]
[ 0 0 0]]
[[ 0 0 0]
[15 15 15]
[ 0 0 0]
...,
[17 17 17]
[17 17 17]
[17 17 17]]]
经过标准化以后的灰度值如下:
[[[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
...,
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]]
[[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
...,
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]]
[[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
...,
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]]
...,
[[ 1.42226791 1.42226791 1.42226791]
[ 1.42226791 1.42226791 1.42226791]
[ 1.56859314 1.56859314 1.56859314]
...,
[ 1.71491838 1.71491838 1.71491838]
[ 1.86124361 1.86124361 1.86124361]
[ 1.71491838 1.71491838 1.71491838]]
[[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[ 1.56859314 1.56859314 1.56859314]
...,
[ 1.86124361 1.86124361 1.86124361]
[ 1.86124361 1.86124361 1.86124361]
[-0.6262852 -0.6262852 -0.6262852 ]]
[[-0.6262852 -0.6262852 -0.6262852 ]
[ 1.56859314 1.56859314 1.56859314]
[-0.6262852 -0.6262852 -0.6262852 ]
...,
[ 1.86124361 1.86124361 1.86124361]
[ 1.86124361 1.86124361 1.86124361]
[ 1.86124361 1.86124361 1.86124361]]]
浮点化后的图像灰度值如下:
[[[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
...,
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]]
[[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
...,
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]]
[[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]
...,
[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 0.]]
...,
[[ 14. 14. 14.]
[ 14. 14. 14.]
[ 15. 15. 15.]
...,
[ 16. 16. 16.]
[ 17. 17. 17.]
[ 16. 16. 16.]]
[[ 0. 0. 0.]
[ 0. 0. 0.]
[ 15. 15. 15.]
...,
[ 17. 17. 17.]
[ 17. 17. 17.]
[ 0. 0. 0.]]
[[ 0. 0. 0.]
[ 15. 15. 15.]
[ 0. 0. 0.]
...,
[ 17. 17. 17.]
[ 17. 17. 17.]
[ 17. 17. 17.]]]
[[[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
...,
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]]
[[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
...,
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]]
[[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
...,
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]]
...,
[[ 1.42226791 1.42226791 1.42226791]
[ 1.42226791 1.42226791 1.42226791]
[ 1.56859314 1.56859314 1.56859314]
...,
[ 1.71491838 1.71491838 1.71491838]
[ 1.86124361 1.86124361 1.86124361]
[ 1.71491838 1.71491838 1.71491838]]
[[-0.6262852 -0.6262852 -0.6262852 ]
[-0.6262852 -0.6262852 -0.6262852 ]
[ 1.56859314 1.56859314 1.56859314]
...,
[ 1.86124361 1.86124361 1.86124361]
[ 1.86124361 1.86124361 1.86124361]
[-0.6262852 -0.6262852 -0.6262852 ]]
[[-0.6262852 -0.6262852 -0.6262852 ]
[ 1.56859314 1.56859314 1.56859314]
[-0.6262852 -0.6262852 -0.6262852 ]
...,
[ 1.86124361 1.86124361 1.86124361]
[ 1.86124361 1.86124361 1.86124361]
[ 1.86124361 1.86124361 1.86124361]]]
说明标准化以后的值确实变得很小,可能训练的时候还可以用标准化,但是测试的时候一定不能用标准化.
结果哎,一个上午过去了。微笑脸.
10,将输入的深度图数值扩大一百倍,看看学习的结果能不能可视化好一些
将退化学习率改为每20个epoch退化百分之60.
失败了,不过我很怀疑是由于深度图本身没有真正变化的原因。
失败了,不过我很怀疑是由于深度图本身没有真正变化的原因。
部分输出值如下:
[[ 1.15784633e+00 3.27637903e-02 1.36905359e-02 ..., 3.34139401e-03
3.58849135e-03 1.62335429e-02]
[ 1.15929224e-01 1.42604741e-03 5.11791324e-04 ..., 1.15818468e-04
1.95197761e-04 7.32403074e-04]
[ 6.20639473e-02 1.02230185e-03 7.45219731e-05 ..., 4.08691558e-05
3.77297329e-05 8.99971696e-04]
到下午了,加油!!
11、奇怪的事情就是程序自身显示拉伸失败了,但是看拉伸的图片来看又是成功的。
12,取消图像的标准化,再次进行实验,检查过label的值是在0-255之间,训练希望也能够出现0-255。
[[ 2.79083792e-02 4.94304595e-06 4.73886612e-05 ..., 1.14416056e-04
6.89384236e-04 1.49361102e-03]
[ 8.24524341e-06 3.53173712e-10 1.89834010e-10 ..., 3.92214261e-08
3.92544628e-08 1.60334866e-06]
[ 2.64768081e-04 4.99194575e-10 6.21489420e-08 ..., 5.02489399e-07
2.83593158e-06 3.04730588e-06]
...,
[ 4.52962820e-04 2.74864647e-07 3.70273881e-07 ..., 4.50034458e-05
9.03578257e-06 4.21129153e-05]
[ 3.45620955e-03 1.79961859e-07 2.32686807e-06 ..., 1.66663704e-05
2.02063038e-05 7.17450621e-06]
[ 3.29677854e-03 7.18166120e-06 4.76332025e-06 ..., 1.10555098e-04
7.29814974e-06 2.26754310e-05]]
[[ 2.00932473e-02 2.48564311e-06 4.59701514e-05 ..., 3.54425392e-05
3.00138228e-04 9.81592922e-04]
[ 4.21343293e-06 1.32197295e-10 1.68629749e-10 ..., 7.87945087e-09
8.81046081e-09 8.44876922e-07]
[ 1.85208381e-04 1.90094523e-10 6.61988508e-08 ..., 1.56437032e-08
3.82572239e-07 1.13918077e-06]
...,
[ 1.95424262e-04 9.83876802e-08 1.41829469e-06 ..., 3.96910691e-05
3.71503811e-05 2.35636500e-04]
[ 1.78155268e-03 8.77953426e-08 4.60725005e-06 ..., 1.39795120e-05
1.88597714e-05 2.96577255e-05]
[ 2.98012071e-03 6.52681729e-06 8.63778041e-06 ..., 1.36464892e-04
2.14246083e-05 7.31654654e-05]]
[[ 1.53459124e-02 1.27038527e-06 2.45261963e-05 ..., 2.59903845e-05
2.52505910e-04 8.68533913e-04]
[ 2.75791353e-06 5.04048539e-11 1.00415710e-10 ..., 4.92389862e-09
6.43427400e-09 7.28820339e-07]
[ 9.78121461e-05 7.32355843e-11 1.78841688e-08 ..., 1.28801734e-08
3.36876639e-07 1.15554019e-06]
...,
[ 4.74871631e-04 3.04274408e-07 6.16687976e-06 ..., 6.24372024e-06
2.75655657e-06 2.04475473e-05]
[ 2.71591870e-03 1.57509291e-07 1.01570640e-05 ..., 3.28384567e-06
5.84733516e-06 4.86498220e-06]
[ 2.94960686e-03 6.70948020e-06 1.68073548e-05 ..., 5.31503974e-05
5.72912995e-06 1.96367091e-05]]
[[ 2.17681285e-02 2.65427661e-06 3.53021387e-05 ..., 1.58478833e-05
1.92930223e-04 6.62445556e-04]
[ 3.81470772e-06 1.33287797e-10 4.27216353e-11 ..., 1.95336658e-09
2.98000358e-09 4.78950312e-07]
[ 1.35025097e-04 1.49426901e-10 1.32244491e-08 ..., 1.31910047e-08
2.26495899e-07 6.66075266e-07]
...,
[ 2.48812197e-04 9.95596423e-08 7.11196932e-08 ..., 1.93231381e-06
1.66148288e-06 1.43663301e-05]
[ 2.43406836e-03 7.88016052e-08 8.75058277e-07 ..., 2.14342276e-06
5.70346219e-06 6.68472558e-06]
[ 2.57573905e-03 5.14793101e-06 2.88273486e-06 ..., 6.27424160e-05
1.15293287e-05 4.36296905e-05]]
[[ 1.42526403e-02 1.31286890e-06 2.05037941e-05 ..., 1.75787427e-04
5.98935236e-04 1.11372746e-03]
[ 2.21214259e-06 4.66560818e-11 4.34013450e-11 ..., 5.88577613e-08
4.41738983e-08 8.76742320e-07]
[ 1.07011096e-04 7.88045948e-11 1.47843950e-08 ..., 1.40059353e-06
3.67539292e-06 3.29282238e-06]
...,
[ 4.54201276e-04 3.14508526e-07 4.84410350e-07 ..., 6.75304500e-06
4.25306735e-06 3.12657539e-05]
[ 3.28799570e-03 1.56902942e-07 2.60152342e-06 ..., 4.68708322e-06
1.18327634e-05 8.67934614e-06]
[ 2.72612041e-03 5.54876033e-06 4.46738386e-06 ..., 8.19059569e-05
9.75328931e-06 3.43201718e-05]]
[[ 2.00932473e-02 2.48564311e-06 4.59701514e-05 ..., 3.54425392e-05
3.00138228e-04 9.81592922e-04]
[ 4.21343293e-06 1.32197295e-10 1.68629485e-10 ..., 7.87945087e-09
8.81046081e-09 8.44876922e-07]
[ 1.85208381e-04 1.90094523e-10 6.61988508e-08 ..., 1.56437032e-08
3.82572239e-07 1.13918077e-06]
...,
[ 1.95424262e-04 9.83876589e-08 1.41829469e-06 ..., 3.96910291e-05
3.71503884e-05 2.35636500e-04]
[ 1.78155268e-03 8.77953426e-08 4.60725005e-06 ..., 1.39795120e-05
1.88597696e-05 2.96577255e-05]
[ 2.98012095e-03 6.52681729e-06 8.63778041e-06 ..., 1.36464892e-04
2.14246083e-05 7.31654654e-05]]
[[ 1.53459124e-02 1.27038527e-06 2.45261981e-05 ..., 2.59904064e-05
2.52505910e-04 8.68533913e-04]
[ 2.75791353e-06 5.04047706e-11 1.00415710e-10 ..., 4.92389907e-09
6.43427400e-09 7.28820339e-07]
[ 9.78121461e-05 7.32355843e-11 1.78841688e-08 ..., 1.28801734e-08
3.36876639e-07 1.15554019e-06]
...,
[ 4.74871631e-04 3.04274408e-07 6.16687976e-06 ..., 6.24372024e-06
2.75655657e-06 2.04475473e-05]
[ 2.71591893e-03 1.57509561e-07 1.01570640e-05 ..., 3.28384567e-06
5.84733516e-06 4.86498220e-06]
[ 2.94960686e-03 6.70948020e-06 1.68073548e-05 ..., 5.31503974e-05
5.72912995e-06 1.96367091e-05]]
[[ 2.62260605e-02 3.68316341e-06 5.72659483e-05 ..., 1.28727013e-04
8.38429667e-04 1.79619028e-03]
[ 6.50709535e-06 1.73042247e-10 2.41016845e-10 ..., 4.55247928e-08
4.27943547e-08 1.82389806e-06]
[ 3.22962267e-04 4.07177264e-10 1.10107948e-07 ..., 2.08147455e-07
2.58348496e-06 3.17436820e-06]
...,
[ 6.57872180e-04 5.22396590e-07 6.92043784e-07 ..., 1.56273134e-04
2.50301709e-05 4.88114747e-05]
[ 4.88260994e-03 2.98406178e-07 4.32130264e-06 ..., 3.55838019e-05
2.71650661e-05 9.94880520e-06]
[ 4.27193707e-03 1.15014436e-05 7.20470052e-06 ..., 1.06280226e-04
1.09371267e-05 3.08137896e-05]]
[[ 1.42526412e-02 1.31286890e-06 2.05037941e-05 ..., 1.75787427e-04
5.98935236e-04 1.11372746e-03]
[ 2.21214259e-06 4.66560818e-11 4.34013450e-11 ..., 5.88577613e-08
4.41739019e-08 8.76740614e-07]
[ 1.07011096e-04 7.88045948e-11 1.47843950e-08 ..., 1.40059353e-06
3.67539292e-06 3.29282238e-06]
...,
[ 4.54201276e-04 3.14508526e-07 4.84410350e-07 ..., 6.75304500e-06
4.25306371e-06 3.12657539e-05]
[ 3.28799570e-03 1.56902971e-07 2.60152342e-06 ..., 4.68708322e-06
1.18327853e-05 8.67934614e-06]
[ 2.72612041e-03 5.54876033e-06 4.46738386e-06 ..., 8.19059569e-05
9.75328931e-06 3.43201718e-05]]
[[ 2.79083792e-02 4.94304595e-06 4.73886612e-05 ..., 1.14416165e-04
6.89384236e-04 1.49361102e-03]
[ 8.24524341e-06 3.53173712e-10 1.89834010e-10 ..., 3.92214261e-08
3.92544628e-08 1.60334866e-06]
[ 2.64768081e-04 4.99194575e-10 6.21489420e-08 ..., 5.02489399e-07
2.83593158e-06 3.04730588e-06]
...,
[ 4.52962820e-04 2.74864647e-07 3.70273881e-07 ..., 4.50034495e-05
9.03578257e-06 4.21129080e-05]
[ 3.45620676e-03 1.79961859e-07 2.32686807e-06 ..., 1.66663685e-05
2.02063202e-05 7.17450621e-06]
[ 3.29677854e-03 7.18166120e-06 4.76332025e-06 ..., 1.10555098e-04
7.29814974e-06 2.26754310e-05]]
[[ 2.17681285e-02 2.65427661e-06 3.53021387e-05 ..., 1.58478833e-05
1.92930223e-04 6.62445556e-04]
[ 3.81470772e-06 1.33287797e-10 4.27216353e-11 ..., 1.95336658e-09
2.98000358e-09 4.78950312e-07]
[ 1.35025097e-04 1.49426901e-10 1.32244482e-08 ..., 1.31910030e-08
2.26495928e-07 6.66075152e-07]
...,
[ 2.48812168e-04 9.95596423e-08 7.11196932e-08 ..., 1.93231381e-06
1.66148288e-06 1.43663301e-05]
[ 2.43406836e-03 7.88014418e-08 8.75058277e-07 ..., 2.14342640e-06
5.70346219e-06 6.68472558e-06]
[ 2.57573905e-03 5.14793101e-06 2.88273486e-06 ..., 6.27424160e-05
1.15293287e-05 4.36296905e-05]]
我发现权值呈现规律性重复的现象还是没有消失
另外。我开始怀疑softmax函数有问题,可能它把所有的位置进行了计算,使得所有的值加起来才为1。
下面开始实验softmax函数
将所有的softmax的值加起来是64,也就是说,确实是针对某一列进行softmax,而不是对所有的元素一起进行softmax。
结论就是,softmax的值小和softmax操作无关。
将test部分的队列设置改成这一句input_queue=tf.train.slice_input_producer(allimage,shuffle=False)
这样可以防止测试顺序不一样,搞得看上去结果不一样。
13,刚刚学会了一种查看所有权值名称的方法。https://blog.csdn.net/cassiepython/article/details/79179044详细见博客
deconv14/B14/beta:0
deconv14/B14/gamma:0
deconv14/C14/weights:0
deconv14/C14/bias:0
deconv14/C14/beta:0
deconv14/C14/gamma:0
deconv14/D14/weights:0
deconv14/D14/bias:0
deconv14/D14/beta:0
deconv14/D14/gamma:0
deconv14/E14/weights:0
deconv14/E14/bias:0
3dconv15/Conv_3d_015/A15/weights:0
3dconv15/Conv_3d_015/A15/bias:0
3dconv15/Conv_3d_015/A15/beta:0
3dconv15/Conv_3d_015/A15/gamma:0
3dconv15/Conv_3d_015/B15/weights:0
3dconv15/Conv_3d_015/B15/bias:0
3dconv15/Conv_3d_015/B15/beta:0
3dconv15/Conv_3d_015/B15/gamma:0
3dconv15/Conv_3d_015/C15/weights:0
3dconv15/Conv_3d_015/C15/bias:0
3dconv15/Conv_3d_015/C15/beta:0
3dconv15/Conv_3d_015/C15/gamma:0
3dconv15/Conv_3d_115/A15/weights:0
3dconv15/Conv_3d_115/A15/bias:0
3dconv15/Conv_3d_115/A15/beta:0
根据检查发现,不同的costvolume对应的权值确实不一样。
我希望能够把权值实时的输出出来,看看权值的变化情况。
14,现在最奇怪的问题是,1,不管我的训练标签图像的值是多大,我的训练最后的输出都非常小。2,就是训练出的权值非常的相似。
15,下面更改一下loss的评价方法 改为平方差的评价方法。失败了,看来不能随便修改损失函数。
16,下午还是没有太大的进步,所以我准备继续用彩色的训练集,这样好看发生了什么。
17,我怀疑是平均滑动模型出了问题
18,损失函数出现NAN,而且平方差的损失函数根本没有出现下降的趋势,感觉一切又回到了起点,呵呵
19,tf.where
tf.where(input, name=None)`
Returns locations of true values in a boolean tensor.
This operation returns the coordinates of true elements in input. The coordinates are returned in a 2-D tensor where the first dimension (rows) represents the number of true elements, and the second dimension (columns) represents the coordinates of the true elements. Keep in mind, the shape of the output tensor can vary depending on how many true values there are in input. Indices are output in row-major order.
For example:
# 'input' tensor is [[True, False]
# [True, False]]
# 'input' has two true values, so output has two coordinates.
# 'input' has rank of 2, so coordinates have two indices.
where(input) ==> [[0, 0],
[1, 0]]
# `input` tensor is [[[True, False]
# [True, False]]
# [[False, True]
# [False, True]]
# [[False, False]
# [False, True]]]
# 'input' has 5 true values, so output has 5 coordinates.
# 'input' has rank of 3, so coordinates have three indices.
where(input) ==> [[0, 0, 0],
[0, 1, 0],
[1, 0, 1],
[1, 1, 1],
[2, 1, 1]]
---------------------
本文来自 Atomwh 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/a_a_ron/article/details/79048446?utm_source=copy
tensorflow中对参数使用正则项分为两步:
1. 创建一个正则方法(函数/对象)
2. 将这个正则方法(函数/对象),应用到参数上