分类 Study 下的文章

宝塔部署Laravel


安装部署说明书参照白俊遥博客https://baijunyao.com,跟着教程过了一遍后端接口环境搭建应用于生产环境的的服务器为不带桌面的版本 Linux 系统,使用国产的免费的面板宝塔来方便搭建LNMP环境;要使用宝塔面板首先需要开启端口;腾讯云:https://www.bt.cn/bbs/thread-1229-1-1.html阿里云:https://www.bt.cn/bbs/thread-2897-1-1.html华为云:https://www.bt.cn/bbs/thread-3923-1-1.html然后执行下面的命令即可;yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install....

15、Dropout原理以及Torch源码的实现


NN.DROPOUTCLASStorch.nn.Dropout(p=0.5, inplace=False)Parametersp (float) – probability of an element to be zeroed. Default: 0.5inplace (bool) – If set to True, will do this operation in-place. Default: FalseShape:Input: (∗)(∗). Input can be of any shapeOutput: (∗)(∗). Output is of the same shape as inputm = nn.Dropout(p=0.2) input = torch.randn(20, 16) output = m(input)如何判断当前是否为Trai...

9、PyTorch的nn.Sequential及ModuleList源码


train# 实例化一个模型,在模型后调用.train(True),说明我们将该模型设置为训练模式 def train(self: T, mode: bool = True) -> T: r"""Sets the module in training mode. This has any effect only on certain modules. See documentations of particular modules for details of their behaviors in training/evaluation mode, if they are affected, e.g. :class:`Dropout`, :class:`BatchNorm`, etc...

召唤看板娘