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

惠东网站建设有没有自动排名的软件

惠东网站建设,有没有自动排名的软件,网站建设收费标准平台,顶级域名和二级域名分类目录:《深入浅出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.15wanjia.com/news/3174.html

相关文章:

  • 外贸整合营销网站app拉新推广代理平台
  • 哪个网站可以做设计赚钱seo包年优化费用
  • 网站的真实域名谷歌seo博客
  • 建材公司网站建设案例百度打车客服电话
  • 自己做网站写网页一般用gbk还是gb2312还是utf8seo人员工作内容
  • 查询企业年报的网站专业推广引流团队
  • 没有网站如何做营销韩国今日特大新闻
  • 公司手机版网站制作地推团队去哪里找
  • 爱旅游网站制作磁力猫最好磁力搜索引擎
  • 在线转格式网站怎么做专业培训seo的机构
  • 网页设计尺寸规范ps专业关键词排名优化软件
  • 和平网站制作兰州seo推广
  • 郑州网站建设 天强科技杭州排名推广
  • 网站开发保密协议平台外宣推广技巧
  • 做复刻衣服买网站中国网站排名查询
  • 微商的自己做网站叫什么软件阿里云域名查询
  • c 网站开发网易云课堂百度云下载百度助手手机下载
  • 社交网站设计腾讯搜索引擎入口
  • 专门做尿不湿的网站个人网页制作成品
  • 微信做网站seo和sem的关系
  • 校园网网站建设实训报告seo运营工作内容
  • 韶关做网站的公司网站域名注册查询
  • 免费网站模板建站网站搜索优化找哪家
  • 孙俪做的网站广告西地那非片能延时多久有副作用吗
  • 营销型网站建设要懂代码吗seo推广方式是什么呢
  • 长沙最新死亡事件宁波seo哪家好快速推广
  • 沈阳市网站建设公司最新国际新闻10条
  • 怎么做让网站排名靠前seo怎么搞
  • 如何做专业的模板下载网站互联网广告推广公司
  • 国外做免费的视频网站有哪些精准推广引流5000客源