尝试在加载示例数据部分中尝试使用此Colab 笔记本并获取此“元组索引超出范围”错误。有任何想法吗?
c_code torch.Size([1, 256, 42, 64]) torch.float32
c_indices torch.Size([2688]) torch.int64
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-14-451617637278> in <module>()
2 print("c_code", c_code.shape, c_code.dtype)
3 print("c_indices", c_indices.shape, c_indices.dtype)
----> 4 assert c_code.shape[2]*c_code.shape[3] == c_indices.shape[1]
5 segmentation_rec = model.cond_stage_model.decode(c_code)
6 show_segmentation(torch.softmax(segmentation_rec, dim=1))
IndexError: tuple index out of range