1、
a = [(1,2), (3, 4), (5, 6)]
c, d = zip(*a)
print(c, d)
(1, 3, 5) (2, 4, 6)
2、
outputs = decoder(tf.random.uniform((batch_size, 1)), sample_hidden, sample_output)
decoder_output, decoder_hidden, decoder_aw = outputs
本文介绍了如何使用Python的zip函数将元组列表压缩成键值对,并展示了如何通过解码器操作随机生成的数据。同时涉及了基础的编码和解码概念在人工智能算法中的应用。
1、
a = [(1,2), (3, 4), (5, 6)]
c, d = zip(*a)
print(c, d)
(1, 3, 5) (2, 4, 6)
2、
outputs = decoder(tf.random.uniform((batch_size, 1)), sample_hidden, sample_output)
decoder_output, decoder_hidden, decoder_aw = outputs

被折叠的 条评论
为什么被折叠?