probablybots commited on
Commit
7fb6582
·
verified ·
1 Parent(s): 88efac5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -10
README.md CHANGED
@@ -20,8 +20,8 @@ mgen test --model SequenceClassification --model.backbone aido_rna_1b600m_cds --
20
  ```python
21
  from modelgenerator.tasks import Embed
22
  model = Embed.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
23
- collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
24
- embedding = model(collated_batch)
25
  print(embedding.shape)
26
  print(embedding)
27
  ```
@@ -30,8 +30,8 @@ print(embedding)
30
  import torch
31
  from modelgenerator.tasks import SequenceClassification
32
  model = SequenceClassification.from_config({"model.backbone": "aido_rna_1b600m_cds", "model.n_classes": 2}).eval()
33
- collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
34
- logits = model(collated_batch)
35
  print(logits)
36
  print(torch.argmax(logits, dim=-1))
37
  ```
@@ -40,8 +40,8 @@ print(torch.argmax(logits, dim=-1))
40
  import torch
41
  from modelgenerator.tasks import TokenClassification
42
  model = TokenClassification.from_config({"model.backbone": "aido_rna_1b600m_cds", "model.n_classes": 3}).eval()
43
- collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
44
- logits = model(collated_batch)
45
  print(logits)
46
  print(torch.argmax(logits, dim=-1))
47
  ```
@@ -49,8 +49,8 @@ print(torch.argmax(logits, dim=-1))
49
  ```python
50
  from modelgenerator.tasks import SequenceRegression
51
  model = SequenceRegression.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
52
- collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
53
- logits = model(collated_batch)
54
  print(logits)
55
  ```
56
 
@@ -58,8 +58,8 @@ print(logits)
58
  ```python
59
  from genbio_finetune.tasks import Embed
60
  model = Embed.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
61
- collated_batch = model.collate({"sequences": ["ACGT", "ACGT"]})
62
- embedding = model(collated_batch)
63
  print(embedding.shape)
64
  print(embedding)
65
  ```
 
20
  ```python
21
  from modelgenerator.tasks import Embed
22
  model = Embed.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
23
+ transformed_batch = model.transform({"sequences": ["ACGT", "AGCT"]})
24
+ embedding = model(transformed_batch)
25
  print(embedding.shape)
26
  print(embedding)
27
  ```
 
30
  import torch
31
  from modelgenerator.tasks import SequenceClassification
32
  model = SequenceClassification.from_config({"model.backbone": "aido_rna_1b600m_cds", "model.n_classes": 2}).eval()
33
+ transformed_batch = model.transform({"sequences": ["ACGT", "AGCT"]})
34
+ logits = model(transformed_batch)
35
  print(logits)
36
  print(torch.argmax(logits, dim=-1))
37
  ```
 
40
  import torch
41
  from modelgenerator.tasks import TokenClassification
42
  model = TokenClassification.from_config({"model.backbone": "aido_rna_1b600m_cds", "model.n_classes": 3}).eval()
43
+ transformed_batch = model.transform({"sequences": ["ACGT", "AGCT"]})
44
+ logits = model(transformed_batch)
45
  print(logits)
46
  print(torch.argmax(logits, dim=-1))
47
  ```
 
49
  ```python
50
  from modelgenerator.tasks import SequenceRegression
51
  model = SequenceRegression.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
52
+ transformed_batch = model.transform({"sequences": ["ACGT", "AGCT"]})
53
+ logits = model(transformed_batch)
54
  print(logits)
55
  ```
56
 
 
58
  ```python
59
  from genbio_finetune.tasks import Embed
60
  model = Embed.from_config({"model.backbone": "aido_rna_1b600m_cds"}).eval()
61
+ transformed_batch = model.transform({"sequences": ["ACGT", "ACGT"]})
62
+ embedding = model(transformed_batch)
63
  print(embedding.shape)
64
  print(embedding)
65
  ```