# Does thoes lines in the equivalent manner in bert?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-thoes-lines-in-the-equivalent-manner-in-bert%2F14596%3E%5C
**Category:** Beginners\
**Created:** [February 10, 2022, 5:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-thoes-lines-in-the-equivalent-manner-in-bert%2F14596 "2022-02-10T17:51:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toyl](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@toyl](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftoyl)%5C
**Post date:** [February 10, 2022, 5:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-thoes-lines-in-the-equivalent-manner-in-bert%2F14596%2F1 "2022-02-10T17:51:09Z")

</div>

do those lines do or equivalent to each other in bert

```auto
tokenized= list(tokenizer.tokenize(sent))
indexed_tokens = tokenizer.convert_tokens_to_ids(tokenized)
tokens_tensor = torch.tensor([indexed_tokens])

```

=

```auto
input_ids = tokenizer.encode(sent)[None, :] 

```
