自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (3)
  • 收藏
  • 关注

原创 ERROR: Could not find a version that satisfies the requirement sklearn

@TOCERROR: Could not find a version that satisfies the requirement sklearn网速问题,使用镜像可以解决pip install sklearn -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

2021-09-14 14:38:06 1310 1

原创 全连接神经网络mnist数据集训练

两个隐藏层,每个隐藏层256个神经元,784行输入,1个输出。It is interesting the first time I train the model with the learning rate 0.01, the accuracy is 0.9721 !!!Amazing !!!However, with the same paremeters, the second is 0.8251. This phenomenon indicates that the result is var

2020-12-04 14:59:34 331

原创 神经网络隐藏层 解决 非线性问题

实例中通过单个隐藏层神经网络来拟合抑或运算,隐藏层使用Relu函数进行激活,输出层使用Tanh函数进行激活。# -*- coding: utf-8 -*-"""Created on Fri Dec 4 09:46:52 2020@author: Melinda"""import tensorflow as tfimport numpy as np# ------定义变量-----------learning_rate =1e-4n_input = 2n_label = 1n_h

2020-12-04 11:12:38 460

原创 Mnist手写数字识别代码

# -*- coding: utf-8 -*-"""Created on Wed Dec 2 11:49:26 2020@author: Melinda"""'''train的shape (55000, 784)test的shape: (10000, 784)validation的shape: (5000, 784)''''''im = mnist.train.images[1] #[55000,784]im = im.reshape(-1, 28)pylab.imshow

2020-12-02 15:51:08 381

原创 Spyder建模 y = 2*x

# -*- coding: utf-8 -*-"# 创建函数图像import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plttrain_X = np.linspace(-1, 1, 100)train_Y = 2 * train_X + np.random.randn(*train_X.shape) * 0.3plt.plot(train_X, train_Y, 'ro', label='Original

2020-11-16 21:50:11 243

原创 Tensorflow虚拟环境相关操作

创建虚拟环境conda create -n tensorflow_cpu python=3.7删除虚拟环境conda remove --name your_env_name --all查看当前虚拟环境conda info --envs

2020-10-12 19:01:10 246

原创 神经网络的学习步骤

前提神经网络存在合适的权重和偏置,调整权重和偏置以便拟合训练数据的过程成为“学习”。神经网络的学习分成下面4个步骤。步骤1(mini-batch)从训练数据中随机选出一部分数据,这部分数据称为mini-batch。我们的目标是减少mini-batch的损失函数的值。步骤2(计算梯度)为了减少mini-batch损失函数的值,需要求出各个权重参数的梯度。梯度表示损失函数值减少最多的方向。步骤3(更新参数)将权重参数沿梯度方向进行微小更新。步骤4(重复)重复步骤1,2,3.这个方法通过梯度下

2020-09-14 09:54:06 2068

原创 Python求解二元二次函数梯度

import numpy as npimport matplotlib.pylab as pltfrom mpl_toolkits.mplot3d import Axes3D#数值微分求解梯度def _numerical_gradient_no_batch(f, x): h = 1e-4 # 0.0001 grad = np.zeros_like(x) for idx in range(x.size): tmp_val = x[idx] .

2020-09-13 12:17:23 1748

原创 Tensorflow2.0实战——Softmax

Softmax多分类Softmax在Tensorflow 2.0 中有两个可以调用的分类方法,一个是sparse_categorical_crossentropy,一个是categorical_crossentropy。前者基于顺序编码,后者是onehot编码。下面将通过一个例子进行介绍。和上篇博客相同的部分,将不做介绍,链接地址:Tensorflow2.0实战——逻辑回归本实例中使用的数据集是fashion_mnist数据集,提取码:gkjbimport tensorflow as tfimp

2020-06-30 20:17:01 873

原创 Tensorflow2.0实战——逻辑回归

Tensorflow2.0界面更加简洁,对使用者也更加友好,下面笔者以逻辑回归为例来分享一下Tensorflow2.0的使用。导入库import tensorflow as tfimport pandas as pdimport matplotlib.pyplot as plt%matplotlib inline读入数据data = pd.read_csv('creditcard.csv')这里笔者的数据是放在同级目录下的,如果目录不一致,需要自行修改。笔者的数据集是信用数据集

2020-06-29 20:09:07 1047

原创 apache-maven-3.3.3 安装包

链接:https://pan.baidu.com/s/1exOuC_V1-_qFzRrAOsAQLg提取码:ikns

2020-05-07 21:28:49 711

原创 github代码上传

准备工作注册一个github账号,网址:github官网注册,注册之后需要牢记账号和密码,后续push时需要安装git工具,下载地址:git工具地址具体操作进入github页面,点击New repository填写仓库相关信息注意到:gtignore:不需要进行版本的仓库类型,会生成.gitignore文件license:证书类型,对应生成LICENSE记下生成的web UR...

2020-04-28 09:19:55 264

原创 小白学习之Tensorflow安装

Tensorflow安装以及填坑Tensorflow安装过程中会出现各种问题,经过无数次跳坑之后,终于解决问题,所以就记录一下:(1)环境:Win10(2)安装步骤:a.安装VC2015(这是基础)b.安装Anaconda安装地址:https://www.anaconda.com/选择合适自己的版本就很好啦注:安装过程中默认的两个选项都选上,path路径会自动添加,还会下载相应的...

2020-03-16 16:34:23 171

Income.csv

Income数据集是通过Education预测Income。该数据集可用于单输出单输出的训练和测试环境。

2020-06-30

credit.csv

credit数据集是对用户的各个指标进行判断,从而判断用户是否回违约,可用于二分类问题的训练和测试数据集。

2020-06-30

fashion-mnist.zip

该数据集为fashion-mnist数据集,包含60000张28*28的图片。可用于Tensorflow2.0进行softmax分类问题,有0-9十个类别。

2020-06-30

空空如也

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

TA关注的人

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