![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python学习笔记
星禾说
这个作者很懒,什么都没留下…
展开
-
pandas numpy
import os import numpy as np import pandas as pd path="/media/liao/Elements/MNIST/3-apple_point_clouds" files=os.listdir(path) # if os.path.exists("./new_building/building_points.txt"): # os.remove("./new_building/building_points.txt") # truth_txt=np原创 2022-03-11 22:22:04 · 2160 阅读 · 0 评论 -
focal loss 多分类问题MNIST手写字学习
focal loss参考 https://blog.csdn.net/u011583927/article/details/90716942 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/media/liao/My Passport/MNIST/", one_hot=True) def multi_category_原创 2022-03-01 16:45:17 · 333 阅读 · 0 评论 -
python布尔型过滤
https://blog.csdn.net/Mr_Pend/article/details/120176280 from sklearn.datasets import make_blobs import matplotlib.pyplot as plt centers = [[1, 1], [-1, -1], [1, -1]] X, labels_true = make_blobs(n_samples=10, centers=centers, cluster_std=0.7,random_state=转载 2022-03-01 09:39:17 · 185 阅读 · 0 评论 -
numpy练习笔记
习题来源:https://cloud.tencent.com/developer/inventory/514 1.如何用0来填充一个数组的边界? z= np.ones((10, 10)) z= np.pad(z, pad_width=1, mode='constant', constant_values=0) print (z) [[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0.] [0. 1. 1.原创 2021-04-18 12:23:46 · 445 阅读 · 1 评论 -
python学习之文件处理,pandas方法处理
文件打开、读取、查找指针位置、指针重新定位 # 打开一个文件 fo = open("foo.txt", "r+") #读取文件一部分 str = fo.read(10) print "读取的字符串是 : ", str # 查找当前位置 position = fo.tell() print "当前文件位置 : ", position # 把指针再次重新定位到文件开头 position = fo.seek(0, 0) str = fo.read(10) print "重新读取字符串 : ", str #原创 2021-04-07 15:01:12 · 107 阅读 · 0 评论 -
python笔记之列表、元组、字典
学习资料来源:https://www.runoob.com/python/python-lists.html 列表操作说明列表建立列表访问(切片,截取等)更新列表删除列表 列表建立 list1 = ['physics', 'chemistry', 1997, 2000] list2 = [1, 2, 3, 4, 5 ] list3 = ["a", "b", "c", "d"] 列表访问(切片,截取等) list1 = ['physics', 'chemistry', 1997, 2000] list2 =原创 2021-04-07 14:35:29 · 115 阅读 · 2 评论 -
Matplotlib 图形中文显示
来源:https://www.runoob.com/numpy/numpy-matplotlib.html Matplotlib 默认情况不支持中文,我们可以使用以下简单的方法来解决。 这里我们使用思源黑体,思源黑体是 Adobe 与 Google 推出的一款开源字体。 官网:https://source.typekit.com/source-han-serif/cn/ GitHub 地址:https://github.com/adobe-fonts/source-han-sans/tree/release转载 2020-10-19 17:40:07 · 103 阅读 · 0 评论