当前位置: 首页 > news >正文

响应式网站建设 苏州wordpress网站的跳出率很低

响应式网站建设 苏州,wordpress网站的跳出率很低,企业网盘推荐,网络营销外包网络推广分类目录:《深入浅出Pytorch函数》总目录 相关文章: 机器学习中的数学——激活函数:Softmax函数 深入浅出Pytorch函数——torch.softmax/torch.nn.functional.softmax 深入浅出Pytorch函数——torch.nn.Softmax 将Softmax函数应用于沿dim的…

分类目录:《深入浅出Pytorch函数》总目录
相关文章:
· 机器学习中的数学——激活函数:Softmax函数
· 深入浅出Pytorch函数——torch.softmax/torch.nn.functional.softmax
· 深入浅出Pytorch函数——torch.nn.Softmax


将Softmax函数应用于沿dim的所有切片,并将重新缩放它们,使元素位于 [ 0 , 1 ] [0, 1] [0,1]的范围内并和为1。

语法

torch.softmax(input, dim, *, dtype=None) -> Tensor
torch.nn.functional.softmax(input, dim=None, _stacklevel=3, dtype=None) -> Tensor

参数

  • input:[Tensor] 输入张量
  • dim:[int] Softmax函数将沿着dim轴计算,即沿dim的每个切片的和为1
  • dtype:[可选, torch.dtype] 想要返回张量的数据类型。如果指定,则在执行操作之前将输入张量强制转换为dtype。这对于防止数据类型溢出非常有用。默认值为None

返回值

input具有相同形状且值在[0,1]范围内的Tensor

实例

>>> x = torch.randn(4, 5)
>>> torch.nn.functional.softmax(x, dim=0)
tensor([[0.4259, 0.5448, 0.1935, 0.3904, 0.1963],[0.1370, 0.1053, 0.1966, 0.2625, 0.4343],[0.0540, 0.2823, 0.5101, 0.2082, 0.0905],[0.3832, 0.0676, 0.0998, 0.1390, 0.2789]])>>> torch.nn.functional.softmax(x, dim=1)
tensor([[0.0728, 0.1720, 0.1233, 0.5541, 0.0779],[0.1139, 0.0667, 0.2677, 0.4361, 0.1156],[0.2576, 0.0811, 0.0671, 0.2975, 0.2968],[0.1874, 0.0358, 0.2240, 0.4470, 0.1057]])

函数实现

def softmax(input: Tensor, dim: Optional[int] = None, _stacklevel: int = 3, dtype: Optional[DType] = None) -> Tensor:r"""Applies a softmax function.Softmax is defined as::math:`\text{Softmax}(x_{i}) = \frac{\exp(x_i)}{\sum_j \exp(x_j)}`It is applied to all slices along dim, and will re-scale them so that the elementslie in the range `[0, 1]` and sum to 1.See :class:`~torch.nn.Softmax` for more details.Args:input (Tensor): inputdim (int): A dimension along which softmax will be computed.dtype (:class:`torch.dtype`, optional): the desired data type of returned tensor.If specified, the input tensor is casted to :attr:`dtype` before the operationis performed. This is useful for preventing data type overflows. Default: None... note::This function doesn't work directly with NLLLoss,which expects the Log to be computed between the Softmax and itself.Use log_softmax instead (it's faster and has better numerical properties)."""if has_torch_function_unary(input):return handle_torch_function(softmax, (input,), input, dim=dim, _stacklevel=_stacklevel, dtype=dtype)if dim is None:dim = _get_softmax_dim("softmax", input.dim(), _stacklevel)if dtype is None:ret = input.softmax(dim)else:ret = input.softmax(dim, dtype=dtype)return ret
http://www.yayakq.cn/news/861775/

相关文章:

  • 全国建设网站做百度网站要注意什么
  • 制作移动网站公司苏州好的网站公司哪家好
  • 深圳app网站开发网络设计课程什么专业有学
  • 网站设计高端网站制作微信开发者工具代码
  • 一些设计网站平面设计培训怎么样
  • 成都神速建站旅游景点推广策划方案
  • 做网站是58好还是百度好花都网站设计都
  • 荥阳做网站服务器运维
  • 网站开发后端作用网络推广有哪些渠道
  • 企业管理网站手提电脑做网站服务器
  • 建设信用卡申请进度查询官方网站做网站值钱吗
  • 深圳建站公司价格江苏中高风险地区
  • 免费发布信息的网站软件技术专业升本可以升哪些专业
  • 做pc端网站如何装饰工程 技术支持 东莞网站建设
  • 天河建设网站技术商城类网站功能
  • 可以做设计私单的网站中国铁建华南建设有限公司网站
  • 丹东网站seo小程序源码分享网
  • 网站设计师简历六安论坛网最新消息
  • 计算机做网站开题报告企业建设网站公司排名
  • 哪个网站做ppt模板赚钱男的做那个视频网站
  • 海口企业做网站设计企业网站 数据库设计
  • 服务器站点的网站地图怎么做wordpress 相册模式
  • 最简单的单页网站怎么做品牌设计属于平面设计吗
  • 成都网站建设模版办公空间设计装修公司
  • 网页设计跟网站建设网站开发方式的选择
  • 淘宝建设网站的好处在线咨询网站模板
  • 莱阳网站制作网络营销公司全网天下
  • wordpress建什么网站好请举例说明什么是网络营销
  • 做推广网站多少钱it外包服务商10强
  • 一站式企业网站建设经典广告语