![](https://img-blog.csdnimg.cn/20190918140145169.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
python及AI
python及AI
tataoto
这个作者很懒,什么都没留下…
展开
-
深度学习基础
tensorflow原创 2022-11-13 11:44:50 · 382 阅读 · 0 评论 -
Q学习与Sarsa
Q学习与Sarsa原创 2022-10-29 20:58:27 · 319 阅读 · 0 评论 -
python seaborn库绘制热力图调色
热力图调色原创 2022-10-22 22:03:46 · 1223 阅读 · 0 评论 -
pytorch使用Dataset分批次处理数据
import torchimport numpy as npfrom torch.utils.data import Datasetfrom torch.utils.data import DataLoaderimport matplotlib.pyplot as plt# prepare datasetclass DiabetesDataset(Dataset): def __init__(self, filepath): xy = np.loadtxt(filep原创 2021-02-08 11:14:10 · 2017 阅读 · 1 评论 -
pytorch实现BP,处理多维数据输入
import torchimport matplotlib.pyplot as pltimport numpy as npxy = np.loadtxt('000.txt', delimiter=' ', dtype=np.float32)x_data = torch.from_numpy(xy[:, :-1]) # 取前九列y_data = torch.from_numpy(xy[:, [-1]]) # 取最后一列class Model(torch.nn.Module): de原创 2021-02-08 10:36:58 · 2869 阅读 · 3 评论 -
pytorch实现线性模型
import torchimport matplotlib.pyplot as pltx_data = torch.tensor([[1.0], [2.0], [3.0]])y_data = torch.tensor([[2.0], [4.0], [6.0]])class LinearModel(torch.nn.Module): def __init__(self): super(LinearModel, self).__init__() self.l原创 2021-02-06 20:16:35 · 269 阅读 · 0 评论 -
pytorch实现逻辑回归分类
import torchimport matplotlib.pyplot as pltimport numpy as npx_data = torch.tensor([[1.0], [2.0], [3.0]])y_data = torch.tensor([[0.0], [0.0], [1.0]])class LogisticModel(torch.nn.Module): def __init__(self): super(LogisticModel, self).__原创 2021-02-07 10:48:06 · 300 阅读 · 0 评论