Sigmoid函数求导
基础知识:
Sigmoid函数:
Sigmoid图形:
生成Sigmoid图形代码:
import torch from d2l import torch as d2l %matplotlib inline x=torch.arange(-8.0,8.0,0.1,requires_grad=True) sigmoid=torch.nn.Sigmoid() y=sigmoid(x) d2l.plot(x.detach(),y.detach(),'x','sigmoid(x)',figsize=(5,2.5))
求导过程:
故Sigmoid函数的求导结果为:
参考链接:https://zhuanlan.zhihu.com/p/452684332
标签:函数,sigmoid,torch,414,d2l,Sigmoid,求导 From: https://www.cnblogs.com/hechangchun/p/17662428.html