当前位置:网站首页>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
边栏推荐
- [web daily practice] eight color puzzle (float)
- Summary of QT semaphore unresolved errors
- 云呐|如何管理好公司的固定资产,固定资产管理怎么做
- Practical data Lake iceberg lesson 30 MySQL - > iceberg, time zone problems of different clients
- tensorflow常用的函数
- The fourth chapter is to enable the filling object of IM and enable ADO for im column storage (IM 4.8)
- AcWing 1874. Moo encryption (enumeration, hash)
- [Web 每日一练] 八色拼图(float)
- Yunna | fixed assets inventory supports multiple inventory methods (asset inventory)
- Summary of convolution layer and pooling layer
猜你喜欢

积极参与中学机器人竞赛的意义

简易投票系统数据库设计

Redis学习之五---高并发分布式锁实战

Sofa weekly | excellent Committee of the year, contributor of this week, QA of this week

nacos基础(6):nacos配置管理模型

Database design of simple voting system

Simple construction of rebbitmq

docker MySQL主从备份

Nacos Foundation (6): Nacos configuration management model

Nacos Foundation (8): login management
随机推荐
激活函数之阶跃函数
qt 64位静态版本显示gif
Blog post navigation (real-time update)
laravel-admin表单验证
QT 64 bit static version display gif
Yunna | how to manage the company's fixed assets and how to manage fixed assets
Castle.DynamicProxy实现事务单元控制
Golang Pen & interview 01
MySQL 的主从复制配置
[web daily practice] eight color puzzle (float)
Redis learning 5 - high concurrency distributed lock practice
MQ的了解
How imeu is associated with imcu (IM 5.5)
Tensorflow使用keras创建神经网络的方法
论坛系统数据库设计
Application of remote integrated monitoring system in power distribution room in 10kV prefabricated cabin project
配电房远程综合监控系统在10kV预制舱项目中的应用
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
Purpose of IM expression (IM 5.2)
stylecloud ,wordcloud 库学习及使用例子