网站首页
编程语言
数据库
系统相关
其他分享
编程问答
PyTorchStepByStep
2024-11-03
PyTorchStepByStep - Chapter 9: Sequence-to-Sequence
points,directions=generate_sequences(n=256,seed=13)Andthenlet’svisualizethefirstfivesquares:classEncoder(nn.Module):def__init__(self,n_features,hidden_dim):super().__init__()self.n_features=n_features
2024-10-20
PyTorchStepByStep - Chapter 6: Rock, Paper, Scissors…
https://storage.googleapis.com/download.tensorflow.org/data/rps.ziphttps://storage.googleapis.com/download.tensorflow.org/data/rps-test-set.zip
2024-10-17
PyTorchStepByStep - Chapter 5: Convolutions
single=np.array([[[[5,0,8,7,8,1],[1,9,5,0,7,7],[6,0,2,4,6,6],[9,7,6,6,8,4],[8,3,8,5,1,3],[7,2,7,0,1,0]]]])single.shape#(1,1,6,6)identity=np.array([[[[0,0,
2024-10-17
PyTorchStepByStep - Bonus Chapter: Feature Space
2024-10-14
PyTorchStepByStep - Chapter 3: A Simple Classification Problem
X,y=make_moons(n_samples=100,noise=.3,random_state=0)X_train,X_val,y_train,y_val=train_test_split(X,y,test_size=.2,random_state=13) sc=StandardScaler()sc.fit(X_train)X_train=sc.transform(X_train)X_val=sc.transform(X_val