功能介绍

简介

昇腾NPU是AI算力的后起之秀,但目前训练和在线推理脚本大多是基于GPU的。由于NPU与GPU的架构差异,基于GPU的训练和在线推理脚本不能直接在NPU上使用,脚本转换工具提供了将基于GPU的脚本转换为基于NPU的脚本的自动化方法,节省了人工手动进行脚本迁移的学习成本与工作量,大幅提升了迁移效率。

  • 脚本转换工具根据适配规则,对用户脚本给出修改建议并提供转换功能,大幅度提高了脚本迁移速度,降低了开发者的工作量。除使用表1里的脚本转换成功后可直接运行外,其他脚本的转换结果仅供参考,仍需用户根据实际情况做少量适配。
  • 表1里的原脚本需要在GPU环境下且基于python3能够跑通。
  • 表1里的脚本转换后的执行逻辑与转换前保持一致。
  • 此脚本转换工具当前仅支持PyTorch训练脚本转换。
表1 模型支持列表

序号

模型名称

序号

模型名称

1

2S-AGCN

161

MobileNetV1

2

3D AttentionNet

162

MobileNetV2

3

3D Nested_UNet

163

MobileNetV3

4

3D Resnet

164

MobileNetV3-Small

5

3DUNet

165

Moco V2

6

ACGAN-Mod-Big-TAC

166

MSGAN

7

ADACOS

167

MSPN

8

ADLayer

168

MTCNN

9

Advanced East

169

Multi-Gradient_Descent

10

Adversarial Autoencoder

170

MultiPoseNet

11

Adversarial_Long-Tail

171

Mutual-Channel-Loss

12

AFN

172

MutualNet

13

AlexNet

173

NAS-SEGM

14

AMDIM

174

nest_small

15

ANTIALIASED-CNNS

175

NeuMF

16

Attention R2U-Net

176

nf_resnet26

17

Attention U_Net

177

NFM

18

AUTOAUGMENT

178

nfnet_f1s

19

Autodeeplab

179

NFNet-F

20

AutoInt

180

NF-ResNet

21

axial-deeplab

181

N-Gran

22

BDL

182

Non-Local

23

BEGAN

183

NTS-Net

24

beit_base_patch16_224

184

ONN

25

BERT-ITPT-FiT

185

OpenPose

26

BICYCLEGAN

186

opl

27

BigGAN-Mod-CR

187

ORDERED-NEURONS

28

BigGAN-Mod-DiffAug

188

PASSRnet

29

BiT-M-R50x1

189

PFF

30

BiT-S-R101x1

190

PICANET

31

BiT-S-R50x1

191

Pixel-BERT(VQA)

32

BiT-S-R50x3

192

PixelDA

33

botnet26t_256

193

PixelLink

34

Bottleneck Transformers

194

PNet

35

Boundary-Seeking GAN

195

PointNet++

36

BYOL

196

POSE-TRANSFER

37

CaaM

197

PPN

38

CausalHTP

198

PPON

39

CGAN

199

PreactResNet50

40

CIConv

200

PROSR

41

CMC

201

PSENet

42

CoaT

202

PVANet

43

coat_mini

203

Pysot

44

CondenseNetV2

204

R2U-Net

45

Context Encoder

205

RAFT

46

Context-Conditional GAN

206

RANet

47

ContraGAN

207

RCAN

48

ContraGAN-CR

208

RCNN

49

ContraGAN-DiffAug

209

RecVAE

50

convit_small

210

RefineNet

51

Convit-tiny

211

regnet

52

coral-cnn

212

regnetx_002

53

COSMIC

213

RegNetX-1.6GF

54

COSMIC

214

regnety_064

55

Coupled GAN

215

RegNetY-1.6GF

56

CPC

216

ReID

57

csp-resnet50

217

Relativistic GAN

58

DCNMix

218

repvgg

59

Deep & Cross Network

219

repvgg_a2

60

Deep Convolutional GAN

220

repvgg_b0

61

DeepFM

221

Res2Net

62

DEEPHYPERX

222

RES2NET-PRETRAINEDMODELS

63

DeeplabV3+

223

residual_adapters

64

DeeplabV3+(Xception-JFT)

224

ResMLP

65

DeepMar

225

ResNeSt

66

Deit

226

ResNet101

67

Densenet121

227

ResNet152

68

DenseNet161

228

ResNet18

69

DenseNet169

229

ResNet34

70

DenseNet201

230

ResNet50

71

dgc

231

resnet61q

72

DIFM

232

resnetv2_101

73

DINO

233

resnetv2_50t

74

DiscoGAN

234

Resnext101

75

dla34

235

Resnext101_32x8d

76

DnCNN

236

Resnext50

77

DoReFa-Net

237

ResNeXt-50-32x4d

78

Double-DIP

238

Retinanet

79

DPC

239

rexnet

80

DPL

240

RNet

81

DRAGAN

241

RRN

82

DualGAN

242

SAN

83

DYNABERT

243

SC-SfMLearner

84

EAST

244

S-DCNET

85

ECA-NFNet-L0

245

SegNet

86

EDSR

246

sehalonet33ts

87

efficientnet_b8

247

SelecSLS

88

efficientnet_l2

248

self-attention-GAN

89

Efficientnet-B0

249

SELF-ATTENTION-GAN

90

EfficientNet-B1

250

Semi-Supervised GAN

91

EfficientNet-B2

251

semnasnet_050

92

EfficientNet-B4

252

SENet

93

EfficientNet-b6

253

seresnet18

94

EfficientNet-b7

254

SE-ResNet-50

95

Enhanced Super-Resolution GAN

255

Se-ResNext-50-32x4d

96

ESRGAN

256

SETR

97

EXTD

257

SGCN

98

FACEBOXES-PYTORCH

258

SGNAS

99

FairDARTS

259

Shufflenetv2

100

FBNet-C

260

SiamRPN

101

fbnetc_100

261

SimplePose

102

fbnetv3_b

262

sknet

103

FCN

263

SOF-VSR

104

FD-GAN

264

SpanBERT

105

FIBINET

265

Speech Transformer

106

FixMatch

266

SPSR

107

FOTS

267

SqueezeNet1_0

108

FREE

268

SqueezeNet1_1

109

GAN

269

SRCNN

110

GCANET

270

SSD_MobileNetV2

111

GENet

271

SSD_MobileNetV3

112

gernet_s

272

SSD-Mobilenet

113

GGAG

273

SSL-FEW-SHOT

114

GGAN

274

STARGAN

115

Glu-Mixer

275

STGCN

116

gluon_senet154

276

StochasticDepth50

117

gluon_seresnext101_32x4d

277

SUPCONTRAST

118

gluon_xception

278

Super-Resolution GAN

119

gmlp

279

SUPERVISION-BY-REGISTRATION

120

gmlp_s16_224

280

SWAV

121

GoogleNet

281

Swin Transformer

122

GPU-efficient networks

282

Tacotron2

123

GreedyInfoMax

283

tnt_s_patch16_224

124

GRU

284

TOD

125

halonet_h1

285

Transformer-iN-Transformer

126

haloregnetz_b

286

TransformerXL

127

hardcorenas

287

TrellisNET

128

hardcorenas_a

288

Twins

129

Hourglass

289

twins_pcpvt_small

130

hyperseg

290

UCNET

131

I3D

291

ULTRA-FAST-LANE-DETECTION

132

ICT

292

U-Net

133

IFM

293

UNET-GAN

134

IIC

294

VAE+GAN

135

Inception V4

295

VASNET

136

Inception-ResNet-V2

296

VGG11

137

InceptionV1

297

VGG11_BN

138

InceptionV2

298

VGG13

139

InfoGAN

299

VGG13_BN

140

InsightFace

300

VGG16

141

InsightFace-v2

301

VGG16_BN

142

Lambda Networks

302

VGG19

143

lambda_resnet26t

303

VGG19_BN

144

Least Squares GAN

304

VIT

145

LFFD

305

VIT-base

146

LGAN

306

vovnet-39

147

LIGHT-WEIGHT-REFINENET

307

vsumm-reinforce

148

LPRNet

308

Wasserstein GAN

149

LSGAN

309

Wasserstein GAN DIV

150

LSTM

310

Wasserstein GAN GP

151

MATNET

311

WGAN-WC

152

MiningFSS

312

Wide & Deep

153

mixer_s32_224

313

Wide_ResNet101_2

154

mixnet_s

314

Wide_ResNet50_2

155

MLP-Mixer

315

wideresnet

156

MNasNet

316

Xception

157

MNASNet0_5

317

xception_aligned

158

MNASNet0_75

318

xDeepFM

159

MNASNet1_0

319

yolov5s

160

MNASNet1_3

320

ZERO-DCE

系统要求

脚本转换工具支持Ubuntu 18.04、CentOS 7.6或EulerOS 2.8。

环境准备