随笔分类 - Python
摘要:不加plt的显示,不会有窗口。
阅读全文
摘要:strip() 是为了去除字符串头尾的空格
阅读全文
摘要:import tensorflow as tf import os categories = ['folder1', 'folder2'] for folderName in categories: #os.makedirs('./%s' % folderName, exist_ok=False); # 当文件已存在,无法创建该文件 os.makedirs('./%s' % ...
阅读全文
摘要:代码 结果 代码 结果 代码 结果
阅读全文
摘要:Logistics Regression 二分类问题。 模型 线性模型 响应 sigmoid 损失函数(显示) 最小均方 优化方法 BGD 例子: #coding utf-8 import numpy as np def load_data(file_name): feature_data = []
阅读全文
摘要:换pip源 安装好 python 后,有一个问题就是 pip 安装的默认下载地址在国外。要换一下,不然蜗牛速度,怎么追赶世界?(瞎扯一下,活跃气氛~) Ubuntu下,进入终端(ctrl + alt + t); 在用户目录下(也就是Desk, Download, Pictures...所在); 新建
阅读全文
摘要:"""An example of how to use your own dataset to train a classifier that recognizes people. """ # MIT License # # Copyright (c) 2016 David Sandberg # # Permission is hereby granted, free of charge, ...
阅读全文
摘要:UI界面: Run->Edit Configurations->Parames
阅读全文
摘要:转载自:https://www.cnblogs.com/taurusfy/p/7605787.html **************************************************************************************************
阅读全文
摘要:翻转矩阵的左右。 至少需要是2维矩阵。 例子: 参考: https://docs.scipy.org/doc/numpy/reference/generated/numpy.fliplr.html
阅读全文