随笔 - 785  文章 - 16 评论 - 39 阅读 - 166万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  tensorflow2.0

wu
python控制精度
摘要: 阅读全文
posted @ 2020-01-20 16:39 qqhfeng16 阅读(538) 评论(0) 推荐(0) 编辑
python中print()函数的用法和end=""不换行详解
摘要:需求:打印五个字符,在一行上代码: i = 0while i< 5 : i += 1 print(i,end='')结果: 1 2 3 4 5那么问题来了,为什么加一个end="" 就不换行了,就打印在一行上了呢?首先,我们要聊一聊print()这个内置函数了,它有哪些具体的参数呢?请看列表通过函数 阅读全文
posted @ 2020-01-16 20:17 qqhfeng16 阅读(5283) 评论(0) 推荐(0) 编辑
python中 list 与数组的互相转换
摘要:python中 list 与数组的互相转换 (1)list转array np.array(a) (2)array 转list a.tolist() 阅读全文
posted @ 2020-01-13 22:17 qqhfeng16 阅读(19424) 评论(0) 推荐(2) 编辑
Python 列表(List) 的三种遍历(序号和值)方法
摘要:#!/usr/bin/env python# -*- coding: utf-8 -*-if __name__ == '__main__': list = ['html', 'js', 'css', 'python'] # 方法1 print '遍历列表方法1:' for i in list: pr 阅读全文
posted @ 2020-01-13 20:06 qqhfeng16 阅读(3872) 评论(0) 推荐(1) 编辑
python的lambda函数
摘要:例1:传入多个参数的lambda函数 def sum(x,y): return x+y 用lambda来实现: p = lambda x,y:x+y print(p(4,6)) 例2:传入一个参数的lambda函数 a=lambda x:x*x print(a(3)) 例3:多个参数的lambda形 阅读全文
posted @ 2020-01-12 16:48 qqhfeng16 阅读(317) 评论(0) 推荐(0) 编辑
看了这个解释,终于明白线性回归模型了
摘要:转载 wade1203 发布于2019-07-17 17:11:00 阅读数 1483 收藏 在机器学习和统计领域,线性回归模型是最简单的模型之一。这意味着,人们经常认为对线性回归的线性假设不够准确。 例如,下列2个模型都是线性回归模型,即便右图中的线看起来并不像直线。 图1 同一数据集的两种不同线 阅读全文
posted @ 2020-01-09 10:56 qqhfeng16 阅读(630) 评论(0) 推荐(0) 编辑
关于dateset转为list
摘要:我一直琢磨如何查看test_data的数据,因为它现在已经是 tf.data.Dataset类型了(https://tensorflow.google.cn/api_docs/python/tf/data/Dataset?version=stable#shuffle)原来用list强制转换就可以了呀 阅读全文
posted @ 2020-01-08 12:03 qqhfeng16 阅读(458) 评论(0) 推荐(0) 编辑
如何更新
摘要:Updating Spyder If you installed Spyder through Anaconda (recommended), WinPython, MacPorts, or your system package manager, update using those same m 阅读全文
posted @ 2020-01-08 10:41 qqhfeng16 阅读(241) 评论(0) 推荐(0) 编辑
如何启动tensorboard,总算学会了
只有注册用户登录后才能阅读该文。
posted @ 2020-01-06 01:51 qqhfeng16 阅读(8) 评论(0) 推荐(0) 编辑
Tensorflow2.0报错:ProfilerNotRunningError: Cannot stop profiling. No profiler is running.(修改后别忘了重启内核或关掉重启)
摘要:# 把这个路径用包装一下logdir = os.path.join("cnn_selu_callbacks")print(logdir)if not os.path.exists(logdir): os.mkdir(logdir)output_model_file = os.path.join(lo 阅读全文
posted @ 2020-01-06 01:18 qqhfeng16 阅读(1667) 评论(0) 推荐(1) 编辑
python中的next()以及iter()函数
摘要:我们首先要知道什么是可迭代的对象(可以用for循环的对象)Iterable: 一类:list,tuple,dict,set,str 二类:generator,包含生成器和带yield的generatoe function 而生成器不但可以作用于for,还可以被next()函数不断调用并返回下一个值, 阅读全文
posted @ 2020-01-05 18:11 qqhfeng16 阅读(3359) 评论(0) 推荐(0) 编辑
运行python文件报SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: tr
摘要:举个例子,在文件中我传入的文件路径是这样的sys.path.append('c:\Users\mshacxiang\VScode_project\web_ddt') 原因分析:在windows系统当中读取文件路径可以使用\,但是在python字符串中\有转义的含义,如\t可代表TAB,\n代表换行, 阅读全文
posted @ 2020-01-05 17:05 qqhfeng16 阅读(5765) 评论(0) 推荐(0) 编辑
解决国内安装tensorflow, opencv等安装不成功或下载太慢问题(亲自测试了一下,清华大学的超级快(使用后面带-i的方法,无需修改默认下载地址)。我等一晚上无法下载的,3秒内解决问题)
摘要:解决国内安装tensorflow, opencv等安装不成功或下载太慢问题 复制自博客:https://blog.csdn.net/jorg_zhao/article/details/80075293 1.安装tensorflow官方方法与使用国内源方法 1.1 官方安装方法-适用FQ tensor 阅读全文
posted @ 2020-01-05 16:14 qqhfeng16 阅读(3067) 评论(0) 推荐(0) 编辑
(知道因为下载数据库错误,而导致解压失败,但是找不到下载到哪里了呀!原来在这里)EOFError: Compressed file ended before the end-of-stream marker was reached
摘要:把下载好的数据放在这里就行了 代码报错 EOFError: Compressed file ended before the end-of-stream marker was reached 背景:运行LeNet识别CIFAR-10的图像的代码时,报错: EOFError: Compressed f 阅读全文
posted @ 2020-01-03 23:00 qqhfeng16 阅读(597) 评论(0) 推荐(0) 编辑
在windows环境的anaconda中如何安装matplotlib
摘要:1、不要在控制台的anaconda promot输入 conda install matplotlib,这样不管用。搞不清楚按个运行环境。 2、在spdery的控制台输入conda install matplotlib,就可以安装了。 3、右上侧有subplot的输出结果 阅读全文
posted @ 2020-01-03 10:38 qqhfeng16 阅读(5365) 评论(0) 推荐(0) 编辑
如何安装tensorlflow
摘要:安装tensorflow有很多条件,麻烦的很。 我推荐用一中最好的法子,windows 和 linux 通吃。 神奇的就是用Anaconda. 在Windows安装TensorFlow的方法 1、第一步下载64位(python3.7)版本的Anaconda,并安装。 2、第二步 选择 anacond 阅读全文
posted @ 2020-01-01 10:52 qqhfeng16 阅读(343) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示