1. AC2.
1 2
(575) B3 D4
names = ['Amir', 'Barry', 'Chales', 'Dao'] if 'amir' in names: print(1) else: print(2) AC3.
numbers = [1, 2, 3, 4] numbers.append([5,6,7,8]) print(len(numbers))
A4 C4.
1
B2 D
An exception is thrown
B5 D6 Bint Dlist
8 Python
Achar Cfloat 5.
q=ex+yf=qzA3,3e3 C3,4e3
6.1
x=1,y=2,q=3,z=4
B4,e3 D4,4e3
6. CNNArelu Ctanh
Bsigmoid Dmaxout 6.2
7.
6-1
6-2
A
B
C
D 8.
CNNALeNet-5 CVGG
BAlexNet DResNet
9.
ACNN CGRU 10.
A112*112 C114*114 11.
OpenCV
227
227
B113*113 D115*115
Index
BDBD
BRNN DLSTM kernel size
5*5padding
1stride2
ABGR CGBR 12. pandas
Anumpy Cnumber 13. numpy
Aarange Creshape 14. numpy
Azeros Cempty 15. AC 16. 17. 18. 19. 20. a = [9,6,5,4,1] N = len(a) GPUGPU
TPUNPU
(DSP TPU
DSP 5250
RGB RBG list Dataframe
Series______ ______
______
BD
BD
reval random
ones arange AI
NPU
DSP
) BD
GPU
______________[1, 2, 3]*3 int(8**0.5) ______________________ ____________ alist[3:7]alist[3, 4, 5, 6, 7, 9, 11, 13, 15, 17]______________________ ______________________ for i in range(int(len(a) / 2)): a[i],a[N - i - 1] = a[N - i - 1],a[i] print (a) 1-5 cbbad 6-10 adabb 11-15 adcad 16 break
17 [1,2,3,1,2,3,1,2,3] 18 2
19 [6, 7, 9, 11] 20 [1, 4, 5, 6, 9]
1. pythonimport torch
rand_num=torch.rand(3,4) rand_num=rand_num.unsqueeze(0) print(rand_num.size())
Atorch.Size([1, 3, 4]) Btorch.Size([3, 4]) Ctorch.Size([3, 1, 4]) Dtorch.Size([3, 4, 1]) 2.
pytochvartensor
1
GPU
var=var.to(\
1080ti
____
(550 )
Avar=var.to(\Bvar=var.to(\Cvar=var.cuda()Dvar=var.cuda()3.
pytorchAmodel.eval()Bmodel.eval()Cmodel.eval()Dmodel.eval()4. flask
var=var.to(\var=var.to(\
model
model.eval()
Aapt-get install flask BCyum install flask D5.
Aapp.route(/user/username)
pip install flask wget install flask
Bapp.route(/user/
AC
B D
k-means