def predict(self, test_loader, requested_quantiles, denoise_genes, proteins, cells):
    imputed_test = AnnData(zeros(shape=(len(cells), len(proteins.var))))
    imputed_test.obs = cells
    imputed_test.var.index = proteins.var.index
    if (self.categories_arr is not None):
        celltypes = (['None'] * len(cells))
    for quantile in requested_quantiles:
        imputed_test.layers[('q' + str(round((100 * quantile))))] = np_zeros_like(imputed_test.X)
    self.eval()
    start = 0
    for mod1 in test_loader:
        end = (start + mod1.shape[0])
        with no_grad():
            outputs = self(mod1)
        if (self.categories_arr is not None):
            predicted_types = argmax(outputs['celltypes'], axis=1).cpu().numpy()
            celltypes[start:end] = self.categories_arr[predicted_types].tolist()
        if (len(self.quantiles) > 0):
            (mod2_impute, mod2_quantile) = outputs['modality 2']
        else:
            mod2_impute = outputs['modality 2']
        imputed_test.X[start:end] = mod2_impute.cpu().numpy()
        for quantile in requested_quantiles:
            index = [i for (i, q) in enumerate(self.quantiles) if (quantile == q)][0]
            q_name = ('q' + str(round((100 * quantile))))
            imputed_test.layers[q_name][start:end] = mod2_quantile[:, :, index].cpu().numpy()
        start = end
    if (self.categories_arr is not None):
        imputed_test.obs['transfered cell labels'] = celltypes
    return imputed_test
def predict(self, test_loader, requested_quantiles, denoise_genes, proteins, cells):
    imputed_test = AnnData(zeros(shape=(len(cells), len(proteins.var))))
    imputed_test.obs = cells
    imputed_test.var.index = proteins.var.index
    if (self.categories_arr is not None):
        celltypes = (['None'] * len(cells))
    for quantile in requested_quantiles:
        imputed_test.layers[('q' + str(round((100 * quantile))))] = np_zeros_like(imputed_test.X)
    self.eval()
    start = 0
    for mod1 in test_loader:
        end = (start + mod1.shape[0])
        with no_grad():
            outputs = self(mod1)
        if (self.categories_arr is not None):
            predicted_types = argmax(outputs['celltypes'], axis=1).cpu().numpy()
            celltypes[start:end] = self.categories_arr[predicted_types].tolist()
        if (len(self.quantiles) > 0):
            (mod2_impute, mod2_quantile) = outputs['modality 2']
        else:
            mod2_impute = outputs['modality 2']
        imputed_test.X[start:end] = mod2_impute.cpu().numpy()
        for quantile in requested_quantiles:
            index = [i for (i, q) in enumerate(self.quantiles) if (quantile == q)][0]
            q_name = ('q' + str(round((100 * quantile))))
            imputed_test.layers[q_name][start:end] = mod2_quantile[:, :, index].cpu().numpy()
        start = end
    if (self.categories_arr is not None):
        imputed_test.obs['transfered cell labels'] = celltypes
    return imputed_test