擅长:python、mysql、java
<p>Sigmoid可以作为模块<a href="https://pytorch.org/docs/stable/nn.html#sigmoid" rel="nofollow noreferrer">^{<cd1>}</a>和函数<a href="https://pytorch.org/docs/stable/torch.html#torch.sigmoid" rel="nofollow noreferrer">^{<cd2>}</a>。包装器是一个等价的模块。在</p>
<p>这个模块的存在主要是因为历史原因:PyTorch是基于Lua-torch7包的。在torch7中,所有可微神经网络函数都作为模块实现。该模块还可以用于具有简单前馈结构的网络的<a href="https://pytorch.org/docs/stable/nn.html#sequential" rel="nofollow noreferrer">^{<cd3>}</a>块中。在</p>
<p>除此之外,与函数形式相比,使用模块形式没有任何优势。在</p>
<p><code>torch.nn</code>中的<code>nn</code>代表“神经网络”。在</p>