@staticmethod
def batchify(tensor_data, batch_size, device):
    """
        将数据按batch_size分批
        :param tensor_data:
        :param batch_size:
        :param device:
        :return:
        """
    num_batch = tensor_data.size(0) // batch_size
    tensor_data = tensor_data.narrow(0, 0, num_batch * batch_size)
    tensor_data = tensor_data.view(batch_size, -1).t().contiguous()
    return tensor_data.to(device)
