我在python中遇到了以下表达式。我相信这个表达本身是合法的,它的构造方式实际上是有意义的。但是,从强类型的背景来看,我想知道人们是否通常在python中这样做。。。i、 e.使用同一个类来表达两个完全不同的概念(数据与数据大小元数据)
class AttentionDecoderOutput(
namedtuple("DecoderOutput", [
"logits", "predicted_ids", "cell_output", "attention_scores",
"attention_context"
])):
"""Augmented decoder output that also includes the attention scores.
"""
pass
AttentionDecoderOutput定义数据结构。下面的输出大小定义了namedtuple中每个元素的大小。在
^{pr2}$
目前没有回答
相关问题 更多 >
编程相关推荐