def impute(self, impute_loader, requested_quantiles, denoise_genes, proteins):
    imputed_test = proteins.copy()
    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, bools, celltypes) in impute_loader:
        end = (start + mod1.shape[0])
        with no_grad():
            outputs = self(mod1)
        if (len(self.quantiles) > 0):
            (mod2_impute, mod2_quantile) = outputs['modality 2']
        else:
            mod2_impute = outputs['modality 2']
        imputed_test.X[start:end] = self.fill_predicted(imputed_test.X[start:end], mod2_impute, bools)
        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
    return imputed_test
def impute(self, impute_loader, requested_quantiles, denoise_genes, proteins):
    imputed_test = proteins.copy()
    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, bools, celltypes) in impute_loader:
        end = (start + mod1.shape[0])
        with no_grad():
            outputs = self(mod1)
        if (len(self.quantiles) > 0):
            (mod2_impute, mod2_quantile) = outputs['modality 2']
        else:
            mod2_impute = outputs['modality 2']
        imputed_test.X[start:end] = self.fill_predicted(imputed_test.X[start:end], mod2_impute, bools)
        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
    return imputed_test