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
5394b117faed9282f1bf7b71685d41f9bbdcc7d1
5394b117faed9282f1bf7b71685d41f9bbdcc7d1
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
)