合肥生活安徽新闻合肥交通合肥房产生活服务合肥教育合肥招聘合肥旅游文化艺术合肥美食合肥地图合肥社保合肥医院企业服务合肥法律

COMP3340代做、代写Python/Java程序
COMP3340代做、代写Python/Java程序

时间:2025-03-15  来源:合肥网hfw.cc  作者:hfw.cc 我要纠错



COMP3340 Applied Deep Learning The University of Hong Kong
Assignment 1
Feb 2025
Question 1 - XOR Approximation
We consider the problem of designing a feedforward neural network to approximate the XOR
function. Specifically, for any input points (x1, x2), x1, x2 ∈ {0, 1}, the output of the network
should be approximately equal to x1 ⊕ x2. Suppose the network has two input neurons, one
hidden layer with two neurons, and an output layer with one neuron, as shown in Figure 1.
The activation function for all neurons is the Sigmoid function defined as σ(z) = 1+
1
e−z .
(a) Please provide the specific values for the parameters in your designed network. Demon strate how your network approximates the XOR function (Table 1) by performing forward
propagation on the given inputs (x1, x2), x1, x2 ∈ {0, 1}.
(b) If we need the neural network to approximate the XNOR function (Table 1), how should
we modify the output neuron without altering the neurons in the hidden layer?
x1 x2 x1 ⊕ x2 x1  x2
0 0 0 1
0 1 1 0
1 0 1 0
1 1 0 1
Table 1: XOR and XNOR Value Table
 !
 "
 #
Figure 1: Network structure and the notation of parameters
COMP3340 Applied Deep Learning The University of Hong Kong
Question 2 - Backpropagation
We consider the problem of the forward pass and backpropagation in a neural network whose
structure is shown in Figure 1. The network parameters is initialized as w1 = 1, w2 = −2,
w3 = 2, w4 = −1, w5 = 1, w6 = 1, b1 = b2 = b3 = 0. The activation function for all neurons
is the Sigmoid function defined as σ(z) = 1+
1
e−z .
(a) Suppose the input sample is (1, 2) and the ground truth label is 0.1. Please compute
the output y of the network.
(b) Suppose we use the Mean Squared Error (MSE) loss. Please compute the loss value for
the sample (1, 2) and its gradient with respect to the network parameters using chain rules.
The final answer should be limited to 3 significant figures.
(c) Suppose we use stochastic gradient descent (SGD) with a learning rate of α = 0.1.
Please specify the parameters of the network after one step of gradient descent, using the
gradient computed in (b). Please also specify the prediction value and the corresponding loss
of the new network on the same input (1, 2).

请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp

扫一扫在手机打开当前页
  • 上一篇:被小猪应急强制下款怎么办?怎么联系米来花客服?
  • 下一篇:CE860代做、代写C/C++编程设计
  • 无相关信息
    合肥生活资讯

    合肥图文信息
    流体仿真外包多少钱_专业CFD分析代做_友商科技CAE仿真
    流体仿真外包多少钱_专业CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流体仿真服务 管路流场仿真外包
    CAE仿真分析代做公司 CFD流体仿真服务 管路
    流体CFD仿真分析_代做咨询服务_Fluent 仿真技术服务
    流体CFD仿真分析_代做咨询服务_Fluent 仿真
    结构仿真分析服务_CAE代做咨询外包_刚强度疲劳振动
    结构仿真分析服务_CAE代做咨询外包_刚强度疲
    流体cfd仿真分析服务 7类仿真分析代做服务40个行业
    流体cfd仿真分析服务 7类仿真分析代做服务4
    超全面的拼多多电商运营技巧,多多开团助手,多多出评软件徽y1698861
    超全面的拼多多电商运营技巧,多多开团助手
    CAE有限元仿真分析团队,2026仿真代做咨询服务平台
    CAE有限元仿真分析团队,2026仿真代做咨询服
    钉钉签到打卡位置修改神器,2026怎么修改定位在范围内
    钉钉签到打卡位置修改神器,2026怎么修改定
  • 短信验证码 宠物饲养 十大卫浴品牌排行 suno 豆包网页版入口 wps 目录网 排行网

    关于我们 | 打赏支持 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | 帮助中心 | 友情链接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥网 版权所有
    ICP备06013414号-3 公安备 42010502001045