[英]Can't figure out how to use value in tensor
At '?!?' 在 '?!?' below is where I don't know how to initiate getting into variable 'recursion' a sample from a normal distribution with mean equal to the x axis value of 'seed' and scale '1.'. 下面是我不知道如何开始从正态分布的样本中获取变量“递归”,该样本的均值等于“种子”的x轴值和标度“ 1”。
tf.enable_eager_execution()
seed=tf.distributions.Normal(loc=0. , scale=1.).sample()
recursion=tf.distributions.Normal(loc=seed?!? , scale=1.).sample()
Tensorflow 1.10, python3. Tensorflow 1.10,python3。
It just didn't occur to me to simply pass the tensor variable in and find out what happens. 我只是没有想到只是将张量变量传递进去,然后找出发生了什么。 Below is code that works fine, no indexing, like for example 'seed[0]' or 'seed[0:0]' instead of simply 'seed', required: 下面是运行良好的代码,不需要索引,例如“ seed [0]”或“ seed [0:0]”,而不是简单的“ seed”,这是必需的:
tf.enable_eager_execution()
seed=tf.distributions.Normal(loc=0. , scale=1.).sample()
recursion=tf.distributions.Normal(loc=seed , scale=1.).sample()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.