Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Fairseq
Commits
ae6f6d56
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "2a3fbc2cc269aa0c0d5cfdfaa3564d769d92b882"
Commit
ae6f6d56
authored
Oct 26, 2017
by
Louis Martin
Committed by
Myle Ott
Nov 08, 2017
Browse files
Fix call to non-existing to_string method
parent
2f781c5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fairseq/dictionary.py
fairseq/dictionary.py
+1
-1
No files found.
fairseq/dictionary.py
View file @
ae6f6d56
...
@@ -45,7 +45,7 @@ class Dictionary(object):
...
@@ -45,7 +45,7 @@ class Dictionary(object):
Can optionally remove BPE symbols or escape <unk> words.
Can optionally remove BPE symbols or escape <unk> words.
"""
"""
if
torch
.
is_tensor
(
tensor
)
and
tensor
.
dim
()
==
2
:
if
torch
.
is_tensor
(
tensor
)
and
tensor
.
dim
()
==
2
:
return
'
\n
'
.
join
(
self
.
to_
string
(
t
)
for
t
in
tensor
)
return
'
\n
'
.
join
(
self
.
string
(
t
)
for
t
in
tensor
)
def
token_string
(
i
):
def
token_string
(
i
):
if
i
==
self
.
unk
():
if
i
==
self
.
unk
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment