tensorflow随笔-tf.group
生活随笔
收集整理的這篇文章主要介紹了
tensorflow随笔-tf.group
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
tf.group
tf.group(
*inputs,
**kwargs
)
創(chuàng)建一個操作,組合多操作。
當該操作完成后,在inputs的所有操作完成,該操作沒有輸出。
參數(shù):
*inputs: 需要組合的零或多個tensors
name: 操作符的名字(可選)
返回:
一個操作符,能處理所有輸入
Raises:
ValueError: 如果提供了unknown關(guān)鍵參數(shù)。
#!/usr/bin/env python2# -*- coding: utf-8 -*- """ Created on Mon Aug 27 11:16:32 2018 @author: myhaspl """import tensorflow as tf x1 = tf.random_normal([3,5000],mean=100) x2 = tf.random_normal([3,5000],mean=100) x3 = tf.random_normal([3,5000],mean=100)y1 = tf.sqrt(x1) y2 = tf.sqrt(x2) y3 = tf.sqrt(x3) z = tf.group([y1,y2,y3])sess=tf.Session() with sess: sess.run(z)總結(jié)
以上是生活随笔為你收集整理的tensorflow随笔-tf.group的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python3随笔-梯度下降法
- 下一篇: tensorflow随笔-变量