tensroflow2.0 报错AttributeError: Tensor.name is meaningless when eager execution is enabled.解决
报错代码如下:importrandomimporttensorflowastfdefZ(a):returna*(4**2+4)defY(a,x):returna*(x**2+4)x=tf.constant(0.0)optimizer=tf.keras.optimizers.Adam(0.01)for_inrange(500):input=random.randint(1,255)target=Z(