mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
More pythonic way to find the longest sequence (#512)
* More pythonic way to find the longest sequence * pep8 fix
This commit is contained in:
committed by
GitHub
parent
0e14c76dee
commit
8cfa52bf1d
@@ -777,7 +777,10 @@
|
||||
" encoded_length = len(encoded_text)\n",
|
||||
" if encoded_length > max_length:\n",
|
||||
" max_length = encoded_length\n",
|
||||
" return max_length"
|
||||
" return max_length\n",
|
||||
" # Note: A more pythonic version to implement this method\n",
|
||||
" # is the following, which is also used in the next chapter:\n",
|
||||
" # return max(len(encoded_text) for encoded_text in self.encoded_texts)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user