2022年5月31日

神经网络与深度学习(邱锡鹏)编程练习 3 实验1 Logistic回归 pytorch

摘要: 实验目标: 实现sigmoid的交叉熵损失函数(不使用tf内置的loss 函数) # 填空一,实现sigmoid的交叉熵损失函数(不使用内置的 loss 函数) # loss_fn = nn.BCELoss() # pytorch交叉熵损失函数 def loss_fn(label, pred): # 阅读全文

posted @ 2022-05-31 21:35 HBU_DAVID 阅读(358) 评论(0) 推荐(0) 编辑

神经网络与深度学习(邱锡鹏)编程练习 3 Logistic回归、softmax回归、支持向量机(SVM)

摘要: Logistic回归以及softmax回归 问题描述 完成 logistic_regression-exercise.ipnb中的填空 填空一:实现sigmoid的交叉熵损失函数(不使用tf内置的loss 函数) 完成 softmax_regression-exercise.ipnb中的填空 填空一 阅读全文

posted @ 2022-05-31 16:23 HBU_DAVID 阅读(371) 评论(0) 推荐(0) 编辑

神经网络与深度学习(邱锡鹏)编程练习 2 实验5 使用pytorch实现线性回归、基函数回归

摘要: # 定义模型 class LR(nn.Module): def __init__(self): super().__init__() self.lr = nn.Linear(ndim, 1) def forward(self, x): out = self.lr(x) return out mode 阅读全文

posted @ 2022-05-31 11:23 HBU_DAVID 阅读(237) 评论(0) 推荐(0) 编辑

导航