Files
mikoto10032--deeplearning/books/PRML/PRML-master-Python/test/nn/nonlinear/softplus.py
T
2026-07-13 13:30:25 +08:00

14 lines
233 B
Python
Executable File

import unittest
import numpy as np
from prml import nn
class TestSoftplus(unittest.TestCase):
def test_softplus(self):
self.assertEqual(nn.softplus(0).value, np.log(2))
if __name__ == '__main__':
unittest.main()