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
53c7d271
"...text-generation-inference.git" did not exist on "9b56d3fbf5d90f5654262a71b5e557da6766b7ad"
Commit
53c7d271
authored
Aug 16, 2018
by
Myle Ott
Browse files
Fix comment
parent
fedc55ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fairseq/models/transformer.py
fairseq/models/transformer.py
+2
-2
No files found.
fairseq/models/transformer.py
View file @
53c7d271
...
@@ -253,7 +253,7 @@ class TransformerEncoder(FairseqEncoder):
...
@@ -253,7 +253,7 @@ class TransformerEncoder(FairseqEncoder):
del
state_dict
[
'encoder.embed_positions.weights'
]
del
state_dict
[
'encoder.embed_positions.weights'
]
state_dict
[
'encoder.embed_positions._float_tensor'
]
=
torch
.
FloatTensor
(
1
)
state_dict
[
'encoder.embed_positions._float_tensor'
]
=
torch
.
FloatTensor
(
1
)
if
state_dict
.
get
(
'encoder.version'
,
torch
.
Tensor
([
1
]))[
0
]
<
2
:
if
state_dict
.
get
(
'encoder.version'
,
torch
.
Tensor
([
1
]))[
0
]
<
2
:
#
earlier checkpoints did not normalize after the stack of layers
#
earlier checkpoints did not normalize after the stack of layers
self
.
layer_norm
=
None
self
.
layer_norm
=
None
self
.
normalize
=
False
self
.
normalize
=
False
state_dict
[
'encoder.version'
]
=
torch
.
Tensor
([
1
])
state_dict
[
'encoder.version'
]
=
torch
.
Tensor
([
1
])
...
@@ -374,7 +374,7 @@ class TransformerDecoder(FairseqIncrementalDecoder):
...
@@ -374,7 +374,7 @@ class TransformerDecoder(FairseqIncrementalDecoder):
state_dict
[
'decoder.layers.{}.{}.{}'
.
format
(
i
,
new
,
m
)]
=
state_dict
[
k
]
state_dict
[
'decoder.layers.{}.{}.{}'
.
format
(
i
,
new
,
m
)]
=
state_dict
[
k
]
del
state_dict
[
k
]
del
state_dict
[
k
]
if
state_dict
.
get
(
'decoder.version'
,
torch
.
Tensor
([
1
]))[
0
]
<
2
:
if
state_dict
.
get
(
'decoder.version'
,
torch
.
Tensor
([
1
]))[
0
]
<
2
:
#
earlier checkpoints did not normalize after the stack of layers
#
earlier checkpoints did not normalize after the stack of layers
self
.
layer_norm
=
None
self
.
layer_norm
=
None
self
.
normalize
=
False
self
.
normalize
=
False
state_dict
[
'decoder.version'
]
=
torch
.
Tensor
([
1
])
state_dict
[
'decoder.version'
]
=
torch
.
Tensor
([
1
])
...
...
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