config
1 | tfconfig = tf.ConfigProto(allow_soft_placement=True) |
声明placeholder
1 | self._image = tf.placeholder(tf.float32, shape=[1, None, None, 3]) |
数字转换
1 | tf.to_int32() |
数组操作
1 | tf.transpose() |
py_func
1 | py_func( |
时间
loss 常用函数
1 | cross_entropy = -tf.reduce_sum(true_y*tf.log(out_y)) |