Update README.md
Browse files
README.md
CHANGED
|
@@ -29,8 +29,8 @@ from NeuralComprehension.tracr4torch import Tokenizer
|
|
| 29 |
model = CoNNModel.from_pretrained('WENGSYX/CoNN_Add_Carry')
|
| 30 |
tokenizer = Tokenizer(model.config.input_encoding_map, model.config.output_encoding_map,model.config.max_position_embeddings)
|
| 31 |
|
| 32 |
-
output = model(tokenizer('2
|
| 33 |
print(tokenizer.decode(output.argmax(2)))
|
| 34 |
|
| 35 |
-
>>> [['bos', '3', '
|
| 36 |
```
|
|
|
|
| 29 |
model = CoNNModel.from_pretrained('WENGSYX/CoNN_Add_Carry')
|
| 30 |
tokenizer = Tokenizer(model.config.input_encoding_map, model.config.output_encoding_map,model.config.max_position_embeddings)
|
| 31 |
|
| 32 |
+
output = model(tokenizer('2 15 3 8 10').unsqueeze(0))
|
| 33 |
print(tokenizer.decode(output.argmax(2)))
|
| 34 |
|
| 35 |
+
>>> [['bos', '3', '5', '3', '9', '0']]
|
| 36 |
```
|