2017-05-06 34 views

回答

2

據我瞭解,這樣的事情是等價的:

import tensorflow as tf 

x = tf.Variable([1, -2, 3], tf.int32, name='x') 

,你可以找到關於以下鏈接theano和tensorflow變量的一些附加信息(感謝bouteillebleu):

http://deeplearning.net/software/theano/library/tensor/basic.html https://www.tensorflow.org/programmers_guide/dims_types


如果您正在使用這些作爲輸入,你不知道最初的內容,你必須使用佔位符:基於http://deeplearning.net/software/theano/

import tensorflow as tf 

x = tf.placeholder(tf.int32, name='x') 
+2

library/tensor/basic.html(對於Theano數據類型)和https://www.tensorflow.org/programmers_guide/dims_types(對於Tensorflow數據類型),看起來是正確的。 (值得鏈接那些在你的帖子?) – bouteillebleu

+0

但我不明白的事情,x不存在。這是第一次用我寫在我的問題中的函數創建x。我如何知道x的內容和維度? – yusuf

+0

我明白了。我正在更新答案。 – purpletentacle

相關問題