当前位置:网站首页>Step function of activation function
Step function of activation function
2022-04-23 11:40:00 【Hey, little black 15kg】
Step function
The step function is expressed in 0 As a boundary , Output from 0 Switch to a 1( Or from 1 Switch to a 0). Its value changes stepwise , So it's called step function .
import matplotlib.pyplot as plt
import numpy as np
def step_function(x):
y = x>0
print(y.shape,y.dtype)
return y.astype(np.int32)
# def step_function(x):
# print(x>0)
# return np.array(x>0,dtype=np.int32)
if __name__ == '__main__':
x = np.arange(-5,5,0.1)
y = step_function(x)
plt.plot(x,y)
plt.ylim(-0.1,1.1)
plt.show()
Execution results :
(100,) bool
版权声明
本文为[Hey, little black 15kg]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231136046057.html
边栏推荐
- docker MySQL主从备份
- 第四章 为IM 启用填充对象之启用和禁用列(IM-4.3 第三部分)
- Docker MySQL master-slave backup
- The fourth chapter is the enable and disable columns of IM enabled fill objects (Part III of im-4.3)
- The listing of saiweidian Technology Innovation Board broke: a decrease of 26% and the market value of the company was 4.4 billion
- 全网最细的短网址系统设计与实战
- qt5. 8. You want to use SQLite in the 64 bit static library, but the static library has no method to compile the supporting library
- Practical data Lake iceberg lesson 30 MySQL - > iceberg, time zone problems of different clients
- Nacos Foundation (7): Configuration Management
- 1.Electron开发环境搭建
猜你喜欢
WIN10 启动后花屏
远程访问家里的树莓派(上)
Interpreting the art created by robots
Résumé de la relation entre GPU, cuda et cudnn
让中小学生在快乐中学习的创客教育
Design and practice of the smallest short website system in the whole network
Analyze the rules for the use of robots with good performance
kettle复制记录到结果和从结果获取记录使用
分享两个实用的shell脚本
力扣-1137.第N个泰波那契数
随机推荐
探究机器人教育的器材与教学
C# F23.StringSimilarity库 字符串重复度、文本相似度、防抄袭
第四章 为IM 启用填充对象之强制填充In-Memory对象:教程(IM 4.7)
My creation anniversary
Usage record of map < qstring, bool >
MQ在laravel中简单使用
第五章 使用In-Memory表达式优化查询(IM 5.1)
用户接口和IM表达式(IM 5.6)
Golang's pen test questions & interview questions 01
解决由于找不到amd_ags_x64.dll,无法继续执行代码。重新安装程序可能会解决此问题,地平线(Forza Horizon 5)
ES6学习笔记二
qt5. 8. You want to use SQLite in the 64 bit static library, but the static library has no method to compile the supporting library
云呐|固定资产盘点中,支持多种盘点方式(资产清查盘点)
Design and practice of the smallest short website system in the whole network
Share two practical shell scripts
1.Electron开发环境搭建
力扣-1137.第N个泰波那契数
Understanding of MQ
RebbitMQ的初步了解
The fourth chapter is about enabling and disabling the im column storage of table space for im enabled filling objects (IM 4.5)