BUG 1. AttributeError: ‘module’ object has no attribute ‘mul’

# 解决方案:
用tf.multiply替代tf.mul

BUG 2. AttributeError: ‘module’ object has no attribute ‘sub’
解决方案:用tf.subtract替代tf.sub

# 解决方案:
用tf.subtract替代tf.sub

BUG 3. AttributeError: ‘module’ object has no attribute ‘neg’

# 解决方案:
用tf.negative替代tf.neg

BUG 4. 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_))
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐