当前位置:网站首页>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
边栏推荐
- QT 64 bit static version display gif
- Simple construction of rebbitmq
- TclError: no display name and no $DISPLAY environment variable
- docker MySQL主从备份
- nacos基础(8):登录管理
- 解决由于找不到amd_ags_x64.dll,无法继续执行代码。重新安装程序可能会解决此问题,地平线(Forza Horizon 5)
- ES6学习笔记二
- 云呐|固定资产盘点中,支持多种盘点方式(资产清查盘点)
- 第四章 为IM 启用填充对象之强制填充In-Memory对象:教程(IM 4.7)
- Who said you should know PS? This open-source artifact can also be pulled in batch, and the effect is outstanding!
猜你喜欢
随机推荐
PyTorch 神经网络训练器
How imeu is associated with imcu (IM 5.5)
Interpretation of biological recognition in robot programming course
[Web 每日一练] 八色拼图(float)
论坛系统数据库设计
5个免费音频素材网站,建议收藏
Advanced file IO of system programming (13) -- IO multiplexing - Select
MySQL 的主从复制配置
Nacos Foundation (9): Nacos configuration management from single architecture to microservices
Golang Pen & interview 01
How Im expressions work (5.3)
简易投票系统数据库设计
Analyze the rules for the use of robots with good performance
少儿编程结构的改变之路
golang之筆試題&面試題01
golang之笔试题&面试题01
ImportError: libX11.so.6: cannot open shared object file: No such file or directory
数据库如何填充IM表达式(IM 5.4)
Cognition and R & D technology of micro robot
tensorflow常用的函数





![[web daily practice] eight color puzzle (float)](/img/59/474080f6377b3684aa4fb2a39e1d81.png)


