Yanisadel commited on
Commit
d3654a6
·
verified ·
1 Parent(s): 08fff2c

Upload inference_example.ipynb

Browse files
Files changed (1) hide show
  1. inference_example.ipynb +9 -1
inference_example.ipynb CHANGED
@@ -52,7 +52,15 @@
52
  " torch.Tensor: One-hot encoded\n",
53
  " - If `sequences` is just one sequence (str), output shape is (seq_len, 4), seq_len being the length of a sequence\n",
54
  " - If `sequences` is a list of sequences, output shape is (num_sequences, seq_len, 4)\n",
55
- " \n",
 
 
 
 
 
 
 
 
56
  " \"\"\"\n",
57
  " one_hot_map = {\n",
58
  " 'a': torch.tensor([1., 0., 0., 0.]),\n",
 
52
  " torch.Tensor: One-hot encoded\n",
53
  " - If `sequences` is just one sequence (str), output shape is (seq_len, 4), seq_len being the length of a sequence\n",
54
  " - If `sequences` is a list of sequences, output shape is (num_sequences, seq_len, 4)\n",
55
+ " \n",
56
+ " Example:\n",
57
+ " >>> sequences = [\"AC\", \"GT\"]\n",
58
+ " >>> encode_sequences(sequences)\n",
59
+ " tensor([[[1., 0., 0., 0.],\n",
60
+ " [0., 1., 0., 0.]],\n",
61
+ "\n",
62
+ " [[0., 0., 1., 0.],\n",
63
+ " [0., 0., 0., 1.]]])\n",
64
  " \"\"\"\n",
65
  " one_hot_map = {\n",
66
  " 'a': torch.tensor([1., 0., 0., 0.]),\n",