tensorflow随笔-条件循环控制(4)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010255642/article/details/82291736

tf.no_op

 

tf.no_op(name=None)

什么都不做,仅做为点位符使用控制边界。

参数:

  • name: 操作名字(可选)

Returns:

创建的操作

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 27 11:16:32 2018
@author: myhaspl
"""
 
import tensorflow as tf
x = tf.random_normal([3,5],mean=100)
y1=x+x
y2=tf.no_op()
z=tf.group([y1,y2])


sess=tf.Session()
with sess: 
    sess.run(z)

猜你喜欢

转载自blog.csdn.net/u010255642/article/details/82291736
今日推荐