自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 Tips for DNN

一、原始的网络 读取数据时数据已归一化 import numpy as np import tensorflow as tf from tensorflow import keras from keras.models import Sequential from keras.layers import Dense from keras.optimizers import SGD,Adam ...

2019-10-03 17:31:10 184

原创 【pyTorch】线性回归 Linear Regression

一、导入基本的包 import torch import torch.nn as nn from torch.autograd import Variable import torch.optim as optim import matplotlib.pyplot as plt import numpy as np 二、数据准备 pyTorch中的基本数据类型为Tensor,相当于nump...

2019-09-26 22:10:58 513

原创 【pytorch】分类

# 分类 n_data=torch.ones(100,2) # print(n_data) x0=torch.normal(2*n_data,1) #class 0 y0=torch.zeros(100) x1=torch.normal(-2*n_data,1) #class 1 y1=torch.ones(100) x=torch.cat((x0,x1)).type(torch.floa...

2019-08-04 23:10:56 148

原创 【pytorch】回归

import torch from torch.autograd import Variable import torch.nn.functional as F import matplotlib.pyplot as plt # 回归 class Net(torch.nn.Module): def __init__(self,n_features,n_hidden,n_output)...

2019-08-04 23:08:59 247

原创 PAT 甲级 1002 A+B for Polynomials (25 分)

This time, you are supposed to findA+BwhereAandBare two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the informa...

2019-08-04 16:28:41 84

原创 线性回归以及梯度下降的实现

线性回归 训练模型 建立自变量为w和b的损失函数来刻画模型的结果与真实结果之间的距离 训练线性回归模型实际上是要找到参数w和b使得loss尽可能小(但不是越小越好,过小可能会造成过拟合问题)。 在数学领域,可以使用求极小值或最小值的方法来得到使得loss尽可能小的w和b 在机器学习中,使用梯度下降的方法来寻找使得loss尽可能小的w和b 梯度下降 代...

2019-08-04 14:32:49 174

原创 PAT 甲级 1001 A+B Format (20 分)

Calculatea+band output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input Specification: Each input ...

2019-08-03 21:08:31 88

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除