- 博客(9)
- 收藏
- 关注
原创 随机梯度下降
import numpy as np import matplotlib.pyplot as plt th1 = np.random.random() th2 = np.random.random() th3 = np.random.random() th0 = np.array([th2, th3]) a = 0.0000001 x = np.array([[2104, 3], [1600, 3], [2400, 3], [1416, 2], [3000, 4]]) t = np.array([400
2021-11-12 08:15:37 317 1
原创 强化学习
import gym, os from 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 42
原创 欧拉算法
import matplotlib.pyplot as plt targetX = 10.0 step = 0.1 axis1, axis2 = 0.0, 1.0 X, Y = [axis1], [axis2] def fun(axis1:float, axis2:float): return axis2 - 2 * axis1 / axis2 while axis1 <= targetX: t1 = fun(axis1, axis2) t2 = fun(x + step.
2021-09-24 09:55:38 60
原创 感知器算法
、 import math import random class 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 48
原创 2021-09-03
import numpy as np import matplotlib.pyplot as plt th1 = np.random.random() th2 = np.random.random() th3 = np.random.random() th0 = np.array([th2, th3]) a = 0.0000001 x = np.array([[2104, 3], [1600, 3], [2400, 3], [1416, 2], [3000, 4]]) t = np.array([400.
2021-09-03 09:35:40 38 1
原创 2021-09-03
import numpy as np a = np.array([1,1,1,1]) b = np.array([[1],[1],[1],[1]]) a+b array([[2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2]]) c = np.array([[1,1,1,1]]) c+b array([[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 45 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人