TensorFlow中Session的使用

TensorFlow中Session的使用 TensorFlow中只有让Graph(计算图)上的节点在Session(会话)中执行,才会获得结果。Session的开启涉及真实的运算,所以比较消耗资源。在使用结束后,务必关闭Session。python import tensorflow as tf a = tf.constant(1, dtype=tf.int8) b = tf.constant(
相关文章
相关标签/搜索