- 博客(9)
- 收藏
- 关注
原创 随机梯度下降
import numpy as npimport matplotlib.pyplot as plt th1 = np.random.random()th2 = np.random.random()th3 = np.random.random()th0 = np.array([th2, th3])a = 0.0000001x = np.array([[2104, 3], [1600, 3], [2400, 3], [1416, 2], [3000, 4]])t = np.array([400
2021-11-12 08:15:37
348
原创 强化学习
import gym, osfrom itertools import countimport paddleimport paddle.nn as nnimport paddle.optimizer as optimimport paddle.nn.functional as Ffrom paddle.distribution import Categoricalprint(paddle.__version__)device = paddle.get_device()env = gym.make("Car
2021-10-21 17:18:21
75
原创 欧拉算法
import matplotlib.pyplot as plttargetX = 10.0step = 0.1axis1, axis2 = 0.0, 1.0X, Y = [axis1], [axis2]def fun(axis1:float, axis2:float): return axis2 - 2 * axis1 / axis2while axis1 <= targetX: t1 = fun(axis1, axis2) t2 = fun(x + step.
2021-09-24 09:55:38
97
原创 感知器算法
、import mathimport randomclass Perceptron: def __init__(self) -> None: self.th = 0.5 self.eps = 1e-4 self.tot = 0 self.de = [10.0, 10.0, 10.0] self.W = [random.random(), random.random(), random.rando..
2021-09-10 23:14:45
76
原创 2021-09-03
import numpy as npimport matplotlib.pyplot as pltth1 = np.random.random()th2 = np.random.random()th3 = np.random.random()th0 = np.array([th2, th3])a = 0.0000001x = np.array([[2104, 3], [1600, 3], [2400, 3], [1416, 2], [3000, 4]])t = np.array([400.
2021-09-03 09:35:40
71
1
原创 2021-09-03
import numpy as npa = np.array([1,1,1,1])b = np.array([[1],[1],[1],[1]])a+barray([[2, 2, 2, 2],[2, 2, 2, 2],[2, 2, 2, 2],[2, 2, 2, 2]])c = np.array([[1,1,1,1]])c+barray([[2, 2, 2, 2],[2, 2, 2, 2],[2, 2, 2, 2],[2, 2, 2, 2]])W = np.array([[1,.
2021-09-03 09:19:22
75
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人