- 博客(7)
- 收藏
- 关注
原创 2021-09-24
import matplotlib.pyplot as pltx, y = 0, 0tarX = 10.0step = 0.1X, Y = [x], [y]def f(x:float, y:float):return y - 2 * x / ywhile x <= tarX:a1 = f(x, y)a2 = f(x + step, y + a1 * step)y = y + 0.5 * (a1 + a2) * stepx = x + stepX.append(x)Y.appe
2021-09-24 15:03:20
64
原创 2021-09-10
import numpy as npdef andActivator(x):if x > 0:return 1else:return 0class ganzhiji(object):def init(self, x):self.x = xself.w = np.random.rand(2, 1)self.b = np.random.rand(1, 1)def forward(self): self.y = np.zeros((4, 1)) for i in ran
2021-09-10 22:49:22
66
原创 2021-09-03
矩阵删除 插入 尾部添加等操作import numpy as npmatrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]p1=np.delete(matrix,1,0)print('>>>>p1>>>>\n',p1)>>>>p1>>>> [[ 1 2 3 4] [ 9 10 11 12]] 把矩阵大于或小于N的元素置M的技巧```python
2021-09-03 16:34:44
59
原创 2021-09-03
import numpy as npimport matplotlib.pyplot as pltclass DN(object);def(sele,th1,th2,th3,th0):self.th1=th1self.th2=th2self.th3=th3:self.th0=th0import numpy as npimport matplotlib.pyplot as pltprint(w11.share)th1 = np.random.random(6,5)th2 = np.
2021-09-03 15:46:48
67
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人