当前位置:网站首页>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
边栏推荐
- 解析社交性机器人对基础科学的作用
- Chapter 4 is a tutorial on forced filling of in memory objects with IM enabled filling objects (IM 4.7)
- TclError: no display name and no $DISPLAY environment variable
- Nacos Foundation (7): Configuration Management
- IMEU如何与IMCU相关联(IM 5.5)
- Siri gave the most embarrassing social death moment of the year
- Advanced file IO of system programming (13) -- IO multiplexing - Select
- Golang Pen & interview 01
- MySQL 的主从复制配置
- Who said you should know PS? This open-source artifact can also be pulled in batch, and the effect is outstanding!
猜你喜欢
实践数据湖iceberg 第三十课 mysql->iceberg,不同客户端有时区问题
力扣-70.爬楼梯
qt5.8 64 位静态库中想使用sqlite但静态库没有编译支持库的方法
解读机器人编程课程的生物认知度
全网最细的短网址系统设计与实战
The way to change children's programming structure
解析幼儿教育中steam教育的融合
怎么进行固定资产盘点,资产盘点报告如何一键生成
Practical data Lake iceberg lesson 30 MySQL - > iceberg, time zone problems of different clients
Application of remote integrated monitoring system in power distribution room in 10kV prefabricated cabin project
随机推荐
少儿编程结构的改变之路
Practical data Lake iceberg lesson 30 MySQL - > iceberg, time zone problems of different clients
RebbitMQ的初步了解
WIN10 启动后花屏
解析社交性机器人对基础科学的作用
Maker education for primary and middle school students to learn in happiness
Interpretation of biological recognition in robot programming course
The listing of saiweidian Technology Innovation Board broke: a decrease of 26% and the market value of the company was 4.4 billion
论坛系统数据库设计
第四章 为IM 启用填充对象之启用和禁用列(IM-4.3 第三部分)
Nacos Basics (5): getting started with Nacos configuration
Laravel admin form validation
获取钉钉考勤机打卡记录
Link sorting of tutorials such as assembly language running environment setting
抓包整理————tcp 协议[八]
The fourth chapter is the enable and disable columns of IM enabled fill objects (Part III of im-4.3)
Nacos Foundation (6): Nacos configuration management model
MySQL 的主从复制配置
用户接口和IM表达式(IM 5.6)
Nacos Foundation (8): login management