ZJUFanLab / scDeepSort

Cell-type Annotation for Single-cell Transcriptomics using Deep Learning with a Weighted Graph Neural Network

Home Page:https://doi.org/10.1093/nar/gkab775

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

retrain model

gerrardmai opened this issue · comments

Could I retain the existed model with new data?
any function could provided?

Yes, the function is train.py

Yes, the function is train.py

but i cannot find any parser.add_argument to load the existed model?

#######
parser = argparse.ArgumentParser()
parser.add_argument("--random_seed", type=int, default=10086)
parser.add_argument("--dropout", type=float, default=0.1,
help="dropout probability")
parser.add_argument("--gpu", type=int, default=2,
help="GPU id, -1 for cpu")
parser.add_argument("--filetype", default='csv', type=str, choices=['csv', 'gz'],
help='data file type, csv or gz')
parser.add_argument("--lr", type=float, default=1e-3,
help="learning rate")
parser.add_argument("--weight_decay", type=float, default=5e-4,
help="Weight for L2 loss")
parser.add_argument("--n_epochs", type=int, default=10,
help="number of training epochs")
parser.add_argument("--dense_dim", type=int, default=400,
help="number of hidden gcn units")
parser.add_argument("--hidden_dim", type=int, default=200,
help="number of hidden gcn units")
parser.add_argument("--n_layers", type=int, default=1,
help="number of hidden gcn layers")
parser.add_argument("--threshold", type=float, default=0,
help="the threshold to connect edges between cells and genes")
parser.add_argument("--num_neighbors", type=int, default=0,
help="number of neighbors to sample in message passing process. 0 means all neighbors")
parser.add_argument("--exclude_rate", type=float, default=0,
help="exclude some cells less than this rate.")
parser.add_argument("--species", default='mouse', type=str)
parser.add_argument("--tissue", required=True, type=str)
parser.add_argument("--batch_size", type=int, default=500)
parser.add_argument("--unsure_rate", type=float, default=2.,
help="the threshold to predict unsure cell")
parser.add_argument("--test_rate", type=float, default=0.2)

Hello, the train.py is to train a new model and it will replace the pre-trained model if the new model has the same tissue name as the one in pre-trained models. You want a model trained with our training data and your new data?

Hello, the train.py is to train a new model and it will replace the pre-trained model if the new model has the same tissue name as the one in pre-trained models. You want a model trained with our training data and your new data?

Hello,
my case is I have trained my own model already .
For example the model is m1 which trained by dataset1. now I want to train the m1 (which is existed ) with other new dataset2.
I know I can merge dataset1 and dataset2 into one csv, then train the model with merged dataset. But it may take times.

Sorry that the current version of scDeepSort doesn't have this function. You can merge dataset1 and dataset2 into one csv, then train the model though it may take time.