3090 Visible Lattice Points 一个(n+1)*(n+1)的点阵,问多少点能被点(0,0)看到 欧拉函数

Visible Lattice Points
Time Limit: 1000MS   Memory Limit: 65536K
Total Submissions: 3212   Accepted: 1761

Description

A lattice point (x, y) in the first quadrant (x and y are integers greater than or equal to 0), other than the origin, is visible from the origin if the line from (0, 0) to (x, y) does not pass through any other lattice point. For example, the point (4, 2) is not visible since the line from the origin passes through (2, 1). The figure below shows the points (<

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这段代码是一个神经网络模型的前向传播函数,其作用是将输入数据沿着神经网络进行计算,得到输出结果。以下是每一行的详细解释: ``` def forward(self, x10, x11, x2, modal=0): ``` 定义了前向传播函数,输入包括3个张量(x10、x11、x2),以及一个可选参数modal。 ``` if modal == 0: ``` 如果modal参数为0,则执行以下操作: ``` if self.fsa_method == 'FSA': x10 = x10 + 0.8 * pha_unwrapping(x10) x11 = x11 + 0.8 * pha_unwrapping(x11) x2 = x2 + 0.8 * pha_unwrapping(x2) x1 = torch.cat((x10, x11), 0) elif self.fsa_method == 'Ex_P': x10 = x10 + 0.8 * pha_unwrapping(x2) x11 = x11 + 0.8 * pha_unwrapping(x2) x2 = x2 + 0.8 * pha_unwrapping(x11) x1 = torch.cat((x10, x11), 0) elif self.fsa_method == 'Mix_A': x10 = mixup(x10, x2) x11 = mixup(x11, x2) x2 = mixup(x2, x11) x1 = torch.cat((x10, x11), 0) else: x1 = torch.cat((x10, x11), 0) ``` 根据fsa_method参数的不同,分别执行不同的操作。这些操作都是对输入数据的一些处理,例如相位解包、混合等。最后将处理后的数据按照特定方式进行拼接。 ``` x1 = self.visible_module(x1) x2 = self.thermal_module(x2) x = torch.cat((x1, x2), 0) ``` 将处理后的数据x1和x2分别输入到可见光模块和热红外模块中进行计算,最后将计算结果按照特定方式进行拼接得到x。 ``` elif modal == 1: x = self.visible_module(x10) elif modal == 2: x = self.thermal_module(x2) ``` 如果modal参数为1,则只对可见光图像进行计算;如果modal参数为2,则只对热红外图像进行计算。最终输出结果为x。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值