def embed(self, impute_loader, test_loader, cells_train, cells_test):
    if (cells_test is not None):
        embedding = AnnData(zeros(shape=((len(cells_train) + len(cells_test)), 512)))
        embedding.obs = concat((cells_train, cells_test), join='inner')
    else:
        embedding = AnnData(zeros(shape=(len(cells_train), 512)))
        embedding.obs = cells_train
    self.eval()
    start = 0
    for (mod1, bools, celltypes) in impute_loader:
        end = (start + mod1.shape[0])
        outputs = self(mod1)
        embedding[start:end] = outputs['embedding'].detach().cpu().numpy()
        start = end
    if (cells_test is not None):
        for mod1 in test_loader:
            end = (start + mod1.shape[0])
            outputs = self(mod1)
            embedding[start:end] = outputs['embedding'].detach().cpu().numpy()
            start = end
    return embedding
def embed(self, impute_loader, test_loader, cells_train, cells_test):
    if (cells_test is not None):
        embedding = AnnData(zeros(shape=((len(cells_train) + len(cells_test)), 512)))
        embedding.obs = concat((cells_train, cells_test), join='inner')
    else:
        embedding = AnnData(zeros(shape=(len(cells_train), 512)))
        embedding.obs = cells_train
    self.eval()
    start = 0
    for (mod1, bools, celltypes) in impute_loader:
        end = (start + mod1.shape[0])
        outputs = self(mod1)
        embedding[start:end] = outputs['embedding'].detach().cpu().numpy()
        start = end
    if (cells_test is not None):
        for mod1 in test_loader:
            end = (start + mod1.shape[0])
            outputs = self(mod1)
            embedding[start:end] = outputs['embedding'].detach().cpu().numpy()
            start = end
    return embedding