Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
Geneformer_pytorch
Commits
d92ceae9
Commit
d92ceae9
authored
Sep 30, 2024
by
wangsen
Browse files
update readme.md
parent
ffa11ddb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
README.md
README.md
+0
-3
train_cell.py
train_cell.py
+1
-1
No files found.
README.md
View file @
d92ceae9
...
@@ -111,11 +111,8 @@ python install -e .
...
@@ -111,11 +111,8 @@ python install -e .
单卡运行 gene classification
单卡运行 gene classification
```
```
cd geneformer/
cd geneformer/
python train.py
python train.py
```
```
详情可以参考 Geneformer/examples/cell_classification.ipynb
详情可以参考 Geneformer/examples/cell_classification.ipynb
...
...
train_cell.py
View file @
d92ceae9
...
@@ -139,7 +139,7 @@ for organ in organ_list:
...
@@ -139,7 +139,7 @@ for organ in organ_list:
logging_steps
=
round
(
len
(
organ_trainset
)
/
geneformer_batch_size
/
10
)
logging_steps
=
round
(
len
(
organ_trainset
)
/
geneformer_batch_size
/
10
)
# reload pretrained model
# reload pretrained model
model
=
BertForSequenceClassification
.
from_pretrained
(
"//Geneformer"
,
model
=
BertForSequenceClassification
.
from_pretrained
(
"/
path/to
/Geneformer"
,
num_labels
=
len
(
organ_label_dict
.
keys
()),
num_labels
=
len
(
organ_label_dict
.
keys
()),
output_attentions
=
False
,
output_attentions
=
False
,
output_hidden_states
=
False
).
to
(
"cuda"
)
output_hidden_states
=
False
).
to
(
"cuda"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment