我正在尝试创建具有恒定值的张量。我是这样做的
img_shape = K.shape(ground_truth)
random_val = random.uniform(0,1)
random_tensor = K.constant(random_val,shape = img_shape)
我收到一个错误
NotImplementedError: Cannot convert a symbolic Tensor (Shape_1:0) to a numpy array.
我的ground_truth
是形状为tensorflow.python.framework.ops.Tensor
的{{1}}。谢谢!