tensorflow变量如何存储在内存中

时间:2017-05-25 10:43:04

标签: variables memory tensorflow

当我定义一个变量使用Python时,例如:

import tensorflow as tf

# Create a variable.
w = tf.Variable(<initial-value>, name=<optional-name>)

# Use the variable in the graph like any Tensor.
y = tf.matmul(w, ...another variable or tensor...)

# The overloaded operators are available too.
z = tf.sigmoid(w + y)

# Assign a new value to the variable with `assign()` or a related method.
w.assign(w + 1.0)
w.assign_add(1.0)

我想知道tensorflow如何为Variable w分配内存。 感谢〜

0 个答案:

没有答案