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
dcuai
dlexamples
316d3f9088d2479a79ff4251090254be628ebdc8
316d3f9088d2479a79ff4251090254be628ebdc8
Switch branch/tag
dlexamples
Deepspeed
BingBertGlue
turing
text.py
Find file
Normal view
History
Permalink
text.py
109 Bytes
Edit
Web IDE
Newer
Older
增加ds框架测试模型
Pan,Huiwen
committed
Jul 14, 2022
1
2
3
4
5
6
7
8
9
10
11
import
torch
PAD
=
0
def
mask
(
x
):
return
x
!=
PAD
def
torch_long
(
x
):
return
torch
.
LongTensor
(
x
)