Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MoonInTheRiver/DiffSinger
/ encode
Method
encode
utils/text_encoder.py:153–154 ·
view source on GitHub ↗
(self, s)
Source
from the content-addressed store, hash-verified
151
""
"Encodes each byte to an id and appends the EOS token."
""
152
153
def
encode(self, s):
154
return
super(ByteTextEncoderWithEos, self).encode(s) + [EOS_ID]
155
156
157
class
TokenTextEncoder(TextEncoder):
Callers
nothing calls this directly
Calls
1
encode
Method · 0.45
Tested by
no test coverage detected