Python – tensorflow.guarantee_const()
TensorFlow是谷歌设计的开源Python库,用于开发机器学习模型和深度学习神经网络。
guarantee_const()用于保证TensorFlow运行时输入张量是恒定的。
语法: tensorflow.guarantee_const( input, name)
参数:
- input: 它是一个张量。
- name(可选):它定义了该操作的名称
返回:它返回一个与输入张量相同的张量。
示例 1:
输出:
示例 2:
输出: