在运行基于gluonts包的scoregard模型时出现IndexError: tensors used as indices must be long, byte or bool tensors
不知道你这个问题是否已经解决, 如果还没有解决的话:p_local_features = local_features[p_inds] # N*H * C
# p_inds是一个floatTensor 利用.long()转化为整形
# IndexError: tensors used as indices must be long, byte or bool tensors
# 要将tensor作为索引使用,tensor必须是一个long byte或者bool tensor
p_inds, n_inds = p_inds.long(), n_inds.long()