ShuxianZou
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -32,7 +32,7 @@ The pre-training data contains 42 million unique ncRNA sequences from RNAcentral
|
|
32 |
Build any downstream models from this backbone
|
33 |
|
34 |
### Get RNA sequence embedding
|
35 |
-
```
|
36 |
from genbio_finetune.tasks import Embed
|
37 |
model = Embed.from_config({"model.backbone": "rnafm"}).eval()
|
38 |
collated_batch = model.collate({"sequences": ["ACGT", "ACGT"]})
|
@@ -42,7 +42,7 @@ print(embedding)
|
|
42 |
```
|
43 |
|
44 |
### Sequence-level classification
|
45 |
-
```
|
46 |
import torch
|
47 |
from genbio_finetune.tasks import SequenceClassification
|
48 |
model = SequenceClassification.from_config({"model.backbone": "rnafm", "model.n_classes": 2}).eval()
|
@@ -53,7 +53,7 @@ print(torch.argmax(logits, dim=-1))
|
|
53 |
```
|
54 |
|
55 |
### Token-level classification
|
56 |
-
```
|
57 |
import torch
|
58 |
from genbio_finetune.tasks import TokenClassification
|
59 |
model = TokenClassification.from_config({"model.backbone": "rnafm", "model.n_classes": 3}).eval()
|
@@ -69,7 +69,7 @@ print(torch.argmax(logits, dim=-1))
|
|
69 |
|
70 |
|
71 |
### Sequence-level regression
|
72 |
-
```
|
73 |
from genbio_finetune.tasks import SequenceRegression
|
74 |
model = SequenceRegression.from_config({"model.backbone": "rnafm"}).eval()
|
75 |
collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
|
|
|
32 |
Build any downstream models from this backbone
|
33 |
|
34 |
### Get RNA sequence embedding
|
35 |
+
```python
|
36 |
from genbio_finetune.tasks import Embed
|
37 |
model = Embed.from_config({"model.backbone": "rnafm"}).eval()
|
38 |
collated_batch = model.collate({"sequences": ["ACGT", "ACGT"]})
|
|
|
42 |
```
|
43 |
|
44 |
### Sequence-level classification
|
45 |
+
```python
|
46 |
import torch
|
47 |
from genbio_finetune.tasks import SequenceClassification
|
48 |
model = SequenceClassification.from_config({"model.backbone": "rnafm", "model.n_classes": 2}).eval()
|
|
|
53 |
```
|
54 |
|
55 |
### Token-level classification
|
56 |
+
```python
|
57 |
import torch
|
58 |
from genbio_finetune.tasks import TokenClassification
|
59 |
model = TokenClassification.from_config({"model.backbone": "rnafm", "model.n_classes": 3}).eval()
|
|
|
69 |
|
70 |
|
71 |
### Sequence-level regression
|
72 |
+
```python
|
73 |
from genbio_finetune.tasks import SequenceRegression
|
74 |
model = SequenceRegression.from_config({"model.backbone": "rnafm"}).eval()
|
75 |
collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
|