【pytorch系列】——pytorch版本的batch_gather

使用pytorch实现tf.batch_gather:python def batch_gather(data:torch.Tensor, index:torch.Tensor): length = index.shape[0] t_index = index.data.numpy() t_data = data.data.numpy()
相关文章
相关标签/搜索