![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
神经网络
文章平均质量分 51
zjLOVEcyj
composing code was a kind of art
展开
-
tensorflow模拟非线性回归
引入tensoflow,安装的v2版本但要使用v1的会话import tensorflow.compat.v1 as tfimport numpy as npimport matplotlib.pyplot as plttf.disable_v2_behavior()# numpy生成200个随机点x_data = np.linspace(-0.5,0.5,200)[:,np.newaxis]noise = np.random.normal(0,0.02,x_data.shape)y_.原创 2021-03-31 11:31:24 · 191 阅读 · 0 评论 -
keras猫狗图像分类+可视化特征图
构建网络构建卷积神经网络,包括4对卷积层和池化层,输出层用sigmoid激活(二分类),并且对from keras import layersfrom keras import modelsmodel = models.Sequential()model.add(layers.Conv2D(32,(3,3), activation="relu", input_shape=(150,150,3)))model.add(layers.MaxPooling2D((2,2)))model.add(l原创 2021-02-10 15:12:28 · 2561 阅读 · 2 评论 -
京东商品图片爬虫+keras图像分类
京东商品爬虫从https://list.jd.com/list.html?cat=670%2C671%2C673&page=1&s=57&click=0站点进行商品图片爬虫分别爬取手机,pad,笔记本和台式机商品图片各1万张#爬虫代码import reimport requestsfrom multiprocessing.pool import Poolfrom lxml import etreeimport time#爬取每页商品图片urldef crawl(原创 2021-02-06 15:00:12 · 573 阅读 · 0 评论 -
基于keras的电影评论分类
import osos.environ['TF_CPP_MIN_LOG_LEVEL']='2'import numpy as npfrom keras.datasets import imdbfrom keras import modelsfrom (train_data, train_lables), (test_data, test_lables) = imdb.load_data(num_words=10000)def vectorize_sequences(sequences,原创 2020-12-30 16:59:29 · 192 阅读 · 3 评论 -
sklearn.neural_network.MLPClassifier用法
from sklearn.neural_network import MLPClassifier#初始化输入矩阵X = [[0., 0.], [1., 1.]]#初始化目标值y = [0, 1]#实例化一个人工神经网络分类器并传入数据训练clf = MLPClassifier(solver='sgd', alpha=1e-5, activation='logistic',hidde...原创 2020-04-18 16:18:25 · 3277 阅读 · 0 评论