pytorch学习笔记1--激励函数
pytorch学习笔记1--激励函数激励函数pytorch实现运行结果
激励函数pytorch实现
import torch
import torch.nn.functional as F
import matplotlib.pyplot as plt
x = torch.linspace(-5, 5, 200)
x_np = x.numpy()
# popular activation functions
y_relu = torch.relu(x).numpy()
y_sigmoid = torch
原创
2020-12-06 21:16:51 ·
76 阅读 ·
1 评论