上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: https://www.bilibili.com/video/av38750372/?p=1 阅读全文
posted @ 2019-03-07 22:02 洺剑残虹 阅读(818) 评论(0) 推荐(0) 编辑
摘要: 在TensorFlow中,保存模型与加载模型所用到的是tf.train.Saver()这个类。我们一般的想法就是,保存模型之后,在另外的文件中重新将模型导入,我可以利用模型中的operation和variable来测试新的数据。 什么是TensorFlow中的模型 首先,我们先来理解一下Tensor 阅读全文
posted @ 2019-03-05 18:56 洺剑残虹 阅读(5541) 评论(0) 推荐(0) 编辑
摘要: 卷积网络博大精深,不同的网络模型,跑出来的结果是不一样,在不知道使用什么网络的情况下跑自己的数据集时,我建议最好去参考基于cnn的手写数字识别网络构建,在其基础上进行改进,对于一般测试数据集有很大的帮助。 分享一个网络构架和一中训练方法: # coding:utf-8 import os impor 阅读全文
posted @ 2019-03-04 23:44 洺剑残虹 阅读(1524) 评论(0) 推荐(1) 编辑
摘要: # coding:utf-8 import requests import hashlib import time import json def interpret(contents): url = 'http://fanyi.youdao.com/translate_o?smartresult= 阅读全文
posted @ 2019-03-03 13:13 洺剑残虹 阅读(1600) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8 import json import pandas as pd with open("./article_file/all_article.json","r",encoding="gbk") as f: text = json.load(f) article_dict 阅读全文
posted @ 2019-03-01 20:38 洺剑残虹 阅读(1407) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8 import requests import json from bs4 import BeautifulSoup # 搜索页面 def get_home_page(page): html = "https://s.weibo.com/article?q=%E5%8F% 阅读全文
posted @ 2019-03-01 20:35 洺剑残虹 阅读(2365) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-02-21 10:28 洺剑残虹 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 一、网络各个协议:TCP/IP、SOCKET、HTTP等 网络七层由下往上分别为物理层、数据链路层、网络层、传输层、会话层、表示层和应用层。 其中物理层、数据链路层和网络层通常被称作媒体层,是网络工程师所研究的对象; 传输层、会话层、表示层和应用层则被称作主机层,是用户所面向和关心的内容。 http 阅读全文
posted @ 2019-02-19 11:55 洺剑残虹 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 灰色预测实现见:https://www.jianshu.com/p/a35ba96d852bfrom pandas import Series from pandas import DataFrame import pandas as pd import matplotlib.pyplot as plt class Gray_model: def __init__(self): ... 阅读全文
posted @ 2018-12-27 16:31 洺剑残虹 阅读(1168) 评论(0) 推荐(0) 编辑
摘要: <!-- flowchart 箭头图标 勿删 --> 1,数组 2,List,ListBuffer 3, Map , mutable.Map <!-- flowchart 箭头图标 勿删 --> 1,数组 2,List,ListBuffer 3, Map , mutable.Map 1,数组 2,L 阅读全文
posted @ 2018-12-26 11:39 洺剑残虹 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1、心得: 在使用TensorFlow做非线性拟合的时候注意的一点就是输出层不能使用激活函数,这样就会把整个区间映射到激活函数的值域范围内无法收敛。 # coding:utf-8 import tensorflow as tf import numpy as np import matplotlib 阅读全文
posted @ 2018-12-18 21:26 洺剑残虹 阅读(937) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8 import time import matplotlib.pyplot as plt from autokeras import ImageClassifier # 保存和导入模型方法 from autokeras.utils import pickle_to_fil 阅读全文
posted @ 2018-12-17 17:52 洺剑残虹 阅读(617) 评论(0) 推荐(0) 编辑
摘要: # 我在训练自己的人脸分类模型的时候发现图片的维度不能太高,经过很多次测试过后觉得一般人脸图片分为28*28大小训练的效果比较好。建议在使用其训练自己的物体识别模型的时候,尽量把图片压缩到28*28# coding:utf-8 import time import matplotlib.pyplot as plt from autokeras import ImageClassifier fr... 阅读全文
posted @ 2018-12-15 21:05 洺剑残虹 阅读(1102) 评论(0) 推荐(0) 编辑
摘要: 1、先把字符串时间转为时间类型: 2、对时间进行排序: 阅读全文
posted @ 2018-12-14 22:53 洺剑残虹 阅读(1634) 评论(0) 推荐(0) 编辑
摘要: xgb使用sklearn接口(推荐) XGBClassifier 5.3 基于Scikit-learn接口的分类 输出结果:Accuracy: 96.67 % 基于Scikit-learn接口的回归 参数调优的一般方法 我们会使用和GBM中相似的方法。需要进行如下步骤: 1. 选择较高的学习速率(l 阅读全文
posted @ 2018-12-10 17:52 洺剑残虹 阅读(3038) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8 import numpy as np import matplotlib.pyplot as plt x = np.arange(-5/2,5/2,0.01) y = -x**3+x**2+np.e+x**4 dy = lambda x:-3*x**2+2*x+4*x**3 dyy = lambda x:-6*x+2+12*x**2 a = 0.001 def... 阅读全文
posted @ 2018-12-07 22:28 洺剑残虹 阅读(749) 评论(0) 推荐(0) 编辑
摘要: 一、acc、recall、F1、混淆矩阵、分类综合报告 1、准确率 第一种方式:accuracy_score # 准确率import numpy as np from sklearn.metrics import accuracy_score y_pred = [0, 2, 1, 3,9,9,8,5 阅读全文
posted @ 2018-12-07 19:18 洺剑残虹 阅读(683) 评论(0) 推荐(0) 编辑
摘要: # codind:utf-8 from sklearn.linear_model import SGDRegressor,LinearRegression,Ridge from sklearn.preprocessing import PolynomialFeatures import numpy as np import matplotlib.pyplot as plt x = np.ar... 阅读全文
posted @ 2018-12-07 19:09 洺剑残虹 阅读(1510) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8 # 带参数装饰器 def f1(func): print('开始!') def f2(a): print(func) a() print('执行') return f2 @f1('666') def f3(): print('测试开始') # 无参数装饰器 def f1(fu... 阅读全文
posted @ 2018-11-26 22:31 洺剑残虹 阅读(253) 评论(0) 推荐(0) 编辑
摘要: from multiprocessing import Pool import gevent,os import time def recursion(n): if n == 1 or n ==2: return 1 else: return recursion(n-1)+recursion(n-2) def f1(n): for ... 阅读全文
posted @ 2018-11-20 11:39 洺剑残虹 阅读(431) 评论(0) 推荐(0) 编辑
摘要: python与mongodb的交互 增删改差 首先引入包: pip install pymongo需要用到如下对象: MongoClient对象:用于与MongoDB服务器建立连接 client=MongoClient('主机ip',端口) DataBase对象:对应着MongoDB中的数据库 db 阅读全文
posted @ 2018-11-15 21:28 洺剑残虹 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 安装: 1.获取redis资源 wget http://download.redis.io/releases/redis-5.0.0.tar.gz 2.解压 tar xzvf redis-5.0.0.tar.gz 3.安装 cd redis-4.0.8 make cd src make instal 阅读全文
posted @ 2018-11-11 14:58 洺剑残虹 阅读(527) 评论(0) 推荐(0) 编辑
摘要: 1、安装配置:https://www.cnblogs.com/ymwangel/p/5859453.html 2、使用 阅读全文
posted @ 2018-11-09 21:38 洺剑残虹 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1、 一对多 model.py view.py 2、一对一 一对一的情况和这个差不多,只要把外键的设置改成model.OneToOneField、多对多也是一样的。 3、连表查询 阅读全文
posted @ 2018-11-07 19:38 洺剑残虹 阅读(1139) 评论(0) 推荐(0) 编辑
摘要: Django框架之第三篇模板语法(重要!!!) 一、什么是模板? 只要是在html里面有模板语法就不是html文件了,这样的文件就叫做模板。 二、模板语法分类 一、模板语法之变量:语法为 {{ }}: 在 Django 模板中遍历复杂数据结构的关键是句点字符 .(也就是点) views.py def 阅读全文
posted @ 2018-11-07 10:07 洺剑残虹 阅读(188) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页