【TensorFlow的版本问题,新版本部分函数发生改变】
AttributeError: ‘module’ object has no attribute ‘mul’
用tf.multiply替代tf.mul
AttributeError: ‘module’ object has no attribute ‘mul’
用tf.subtract替代tf.sub
AttributeError: ‘module’ object has no attribute ‘mul’
用tf.negative替代tf.neg
ValueError: Only call sigmoid_cross_entropy_with_logits with named arguments (labels=…, logits=…, …)
将
tf.nn.sigmoid_cross_entropy_with_logits(self.D2_logits_, tf.ones_like(self.D2_) * 0.9))
修改为
tf.nn.sigmoid_cross_entropy_with_logits(labels=tf.ones_like(self.D2_) * 0.9, logits=self.D2_logits_))