- 博客(58)
- 收藏
- 关注
原创 pytorch--实现vgg
#!/usr/bin/env python3# -*- coding:utf-8 -*- # @Time : 2020/2/25 下午12:43# @Author : MJimport torch as timport torch.nn as nnimport mathimport torchvision.transforms as transformsfrom torch...
2020-02-25 17:41:58
446
原创 Pytorch--实现ResNet -CAFAR10
#!/usr/bin/env python3# -*- coding:utf-8 -*- # @Time : 2020/2/24 下午7:05# @Author : MJimport torch as tfrom torch import nnfrom torch.nn import functional as Ffrom torch.autograd import Vari...
2020-02-25 12:16:24
323
原创 TypeError: can't multiply sequence by non-int of type 'numpy.float64'
机器学习实战随机梯度上升TypeError: can't multiply sequence by non-int of type 'numpy.float64'原始代码def stocgradAscent0(dataMatrix, classLabels): m, n = dataMatrix.shape alpha = 0.01 weights = np.on...
2019-11-21 15:15:09
2481
1
原创 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 884: invalid start byte
机器学习实战第四章emailText = open('email/ham/6.txt').read()出现以下错误UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 884: invalid start byteemailText = open('email/ham/6.txt',encoding='...
2019-11-20 11:13:29
952
3
原创 python字典items函数的用法
python字典items函数的用法dict = {'Google': 'www.google.com', 'Runoob': 'www.runoob.com', 'taobao': 'www.taobao.com'} print "字典值 : %s" % dict.items() # 遍历字典列表for key,values in dict.items(): print ...
2019-11-06 14:17:26
1382
1
原创 Python字典-dict.get()的用法
Python字典-dict.get()的用法dict_name.get(key, default = None)# key: 要设置默认值的Key# default: 要返回key的值,可以是任何值,如整形、字符串、列表、字典等# return: 如果字典中key本来有值,那么返回的是字典中Key所对应的值,如果没有,那么返回“default”中的值。例子dict = {'1': 1...
2019-11-06 13:49:23
10350
原创 Git--初始设置及SSH秘钥配置
对本地计算机里面安装的GIt进行设置.通过在终端输入:mj@mj-OMEN-by-HP-Laptop-15-dc0xxx:~$ gitusage: git [--version] [--help] [-C <path>] [-c name=value] [--exec-path[=<path>]] [--html-path] [--man-pat...
2019-10-29 10:43:43
602
原创 Git--入门创建版本库及远程库
1,创建一个版本库,选择一个合适的地方,创建一个空文件,我这里建的是/home/mj/learngit文件路径最好为英文2,在这个下打开终端,输入git init命令将这个文件变成Git可以管理的仓库mj@mj-OMEN-by-HP-Laptop-15-dc0xxx:~/learngit$ git init注意:文件下面有一个.git的目录,这个是Git用来跟踪管理版本库,没事千万不要...
2019-10-29 10:05:54
284
原创 多线程冲突: "RuntimeError: main thread is not in main loop"
https://www.jianshu.com/p/1f7c8f2e802e
2019-08-30 10:57:14
3853
原创 numpy.random.shuffle打乱数组或者列表的顺序
numpy.random.shuffle注:打乱数组时,只沿着多维数组的第一个轴移动数组。子数组的顺序改变了,但它们的内容保持不变.shuffle(x) Modify a sequence in-place by shuffling its contents. This function only shuffles the array along the fi...
2019-08-27 14:34:42
1452
原创 numpy:np.argsort()
numpy.argsort(a, axis=-1, kind=’quicksort’, order=None)parameter:a: 需排序的数组axis:排序的维数kind:排序算法的选择argsort函数是将a中的元素从小到大排列,提取其对应的index(索引),然后输出example:import numpy as npx=np.array([1,3,2,-1,6,9])...
2019-08-13 21:24:05
152
原创 利用Python进行数据分析----numpy.title()
numpy.tile(A, reps):通过重复A给出的次数来构造数组。Parameters: A : array_likeThe input array.reps : array_likeThe number of repetitions of A along each axis.Returns: c : ndarrayThe tiled output array.Examp...
2019-08-13 16:50:00
6269
原创 机器学习实战
Python3.6 下出现AttributeError: ‘dict’ object has no attribute 'iteritems’错误:解决方案:python3中已经没有iteritems这个模块了将这行代码:`sortedClassCount = sorted(classCount.iteritems(), key=operator.itemgetter(1), revers...
2019-08-13 11:27:52
130
原创 Keras学习--kernel_initializer 权重初始化
https://blog.youkuaiyun.com/hyl999/article/details/84035578
2019-08-05 21:35:02
2240
1
原创 TFRecord-制作数据集
# -*- coding:utf-8 -*-import osimport tensorflow as tffrom PIL import Imageimport matplotlib.pyplot as pltdef _int64_feature(value): return tf.train.Feature(int64_list=tf.train.Int64List(v...
2019-07-26 14:44:48
150
原创 Tensorflow学习笔记:数值计算函数更改
https://blog.youkuaiyun.com/xxzhangx/article/details/58005846
2019-07-16 20:56:08
119
原创 Tensorflow学习笔记:tf.clip_by_value的用法
https://blog.youkuaiyun.com/UESTC_C2_403/article/details/72190248
2019-07-16 13:53:06
327
原创 Tensorflow学习笔记:np.vstack()和np.hstack()函数
https://blog.youkuaiyun.com/m0_37393514/article/details/79538748
2019-06-10 10:05:29
694
原创 Tensorflow学习笔记:tf.variable_scope 参数
https://blog.youkuaiyun.com/hyxing520/article/details/80889496
2019-06-07 16:41:42
431
原创 运行错误解决方案
Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for i解决:https://blog.youkuaiyun.com/aaon22357/article/details/82736792
2019-06-06 19:21:24
693
原创 利用Python进行数据分析----np.power()数组元素求n次方
https://www.cnblogs.com/luozeng/p/8544012.html
2019-06-01 16:50:34
411
原创 利用Python进行数据分析----矩阵乘法np.dot()及np.multiply()以及*
https://blog.youkuaiyun.com/u012609509/article/details/70230204
2019-05-31 16:31:00
362
原创 利用Python进行数据分析----Numpy中扁平化函数ravel()和flatten()的区别
https://www.cnblogs.com/mzct123/p/8659193.html
2019-05-31 16:23:39
461
原创 利用Python进行数据分析----numpy linalg模块
https://www.cnblogs.com/xieshengsen/p/6836430.html
2019-05-31 14:53:13
188
原创 利用Python进行数据分析----concatenate函数
https://www.cnblogs.com/ymjyqsx/p/6472507.html
2019-05-31 14:37:58
1154
原创 利用Python进行数据分析----np.logspace函数
http://blog.youkuaiyun.com/shenpengjianke/article/details/29356755
2019-05-31 14:34:19
800
原创 面向机器学习的特征工程(白化)
https://www.cnblogs.com/rong86/p/3559137.htmlhttps://www.cnblogs.com/demian/p/7627324.html
2019-05-28 08:49:01
428
原创 python学习笔记(zip 的使用方法)
zip 的使用方法:>>>a = [1,2,3]>>> b = [4,5,6]>>> c = [4,5,6,7,8]>>> zipped = zip(a,b) # 打包为元组的列表 [(1, 4), (2, 5), (3, 6)]>>> zip(a,c) # 元素个数与最短的列表一致...
2019-05-15 08:37:09
100
原创 Tensorflow:21个项目(NewRandomAccessFile failed to Create/Open问题解决)
错误提示:tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: ..pretrained\pet_train.record: ϵͳ\udcd5Ҳ\udcbb\udcb5\udcbdָ\udcb6\udca8\udcb5\udcc4\udcceļ\udcf...
2019-05-07 09:50:21
4231
2
原创 Tensorflow:21个项目(导出模型并预测单张图片)
参考:tensorflow:21个项目(何之源)import numpy as npimport osimport six.moves.urllib as urllibimport sysimport tarfileimport tensorflow as tfimport zipfilefrom collections import defaultdictfrom io...
2019-05-07 09:34:28
1043
原创 Tensorflow:21个项目(解决问题'export' 不是内部或外部命令 和 ModuleNotFoundError: No module named 'object_detection')
在windows中没有此条命令export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim将其换为:SET PYTHONPATH=%cd%;%cd%\slim如果出现ModuleNotFoundError: No module named 'object_detection'在自己的tensorflow环境安装目录下面:我的安装目录D:\Anaco...
2019-05-06 19:44:04
517
原创 Tensorflow:21个项目(object_detection/protos/*.proto: No such file or directory)
在research文件夹下面:shift+右键 的Windows powershell中使用以下命令可以全部编译:Get-ChildItem object_detection/protos/*.proto |Resolve-Path -Relative | %{protoc $_ --python_out=.}...
2019-05-06 19:02:27
172
原创 Tensorflow:21各项目(np.roll()的理解和用法)
参见:https://blog.youkuaiyun.com/lxq1997/article/details/83543709
2019-05-05 20:55:46
578
原创 Tensorflow:21个项目(第三章 data_convert.py 的修改)
参考:http://www.pianshen.com/article/500471432/
2019-05-05 15:21:34
391
原创 Tensorflow:实战Google深度学习框架(collections.namedtuple命名元组)
参见:https://www.cnblogs.com/chenlin163/p/7259061.html
2019-04-28 08:59:41
146
原创 Tensorflow:实战Google深度学习框架(slim.arg_scope()的使用)
slim.arg_scope()的使用参考:https://blog.youkuaiyun.com/u013921430/article/details/80915696
2019-04-27 20:25:12
193
原创 Tensorflow:实战Google深度学习框架(VGGNet16--实现mnist数据集分类)
参考:tensorflow实战 黄文坚# *_*coding:utf-8 *_*from datetime import datetimeimport mathimport timeimport tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_datamnist = input_da...
2019-04-25 14:02:10
1187
原创 Tensorflow:实战Google深度学习框架(tf.multiply与tf.matmul)
tf.multiply与tf.matmul的区别请见:https://blog.youkuaiyun.com/mumu_1233/article/details/78887068
2019-04-22 22:13:43
212
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人