• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






任重道远-HSY

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 2 3 4 5 6 7 8 ··· 19 下一页

2020年5月26日

调整权值w
摘要: 调整权值w 1 import tensorflow as tf 2 import numpy as np 3 w = tf.Variable(5, dtype=tf.float32)#定义权值w 4 lr = 0.2 #学习率 5 epoch = 40 6 7 for epoch in range( 阅读全文
posted @ 2020-05-26 21:19 任重道远-HSY 阅读(177) 评论(0) 推荐(0)
 

2020年5月23日

将图片制作数据拒
摘要: import tensorflow as tf from PIL import Image import numpy as np import cv2 import os def load_sample(sample_dir): print('loading sample dataset..') t 阅读全文
posted @ 2020-05-23 23:17 任重道远-HSY 阅读(156) 评论(0) 推荐(0)
 
python中PIL.Image,OpenCV,Numpy图像格式相互转换
摘要: 元组和列表 a = (1, 2) # a is a tuple b = list(a) # b is a list c = tuple(b) # c is a tuple 元组列表转和ndarray 数组之间转换 a = (1, 2) # a is a tuple b = np.array(a) # 阅读全文
posted @ 2020-05-23 16:05 任重道远-HSY 阅读(5583) 评论(0) 推荐(1)
 
加载图像数据集
摘要: #path:数据路径 #txt:每条数据对应的标签 1 def generateds(path, txt): 2 f = open(txt, 'r') # 以只读形式打开txt文件 3 contents = f.readlines() # 读取文件中所有行 4 f.close() # 关闭txt文件 阅读全文
posted @ 2020-05-23 15:55 任重道远-HSY 阅读(198) 评论(0) 推荐(0)
 

2020年5月20日

numpy
摘要: import numpy as np a = np.array([[1,2],[3,4],[5,6],[7,8]])#创建4×2的数组 b = a.reshape(2,4) #改变数组的形状为2×4,并赋值给b; a.shape=(2,4) #改变数组a自身形状 #In[0]创建数组 x = np. 阅读全文
posted @ 2020-05-20 17:01 任重道远-HSY 阅读(109) 评论(0) 推荐(0)
 

2020年4月16日

无损音乐下载网站
摘要: https://www.sq688.com/download/2634.html 阅读全文
posted @ 2020-04-16 17:10 任重道远-HSY 阅读(408) 评论(0) 推荐(0)
 

2020年4月14日

加载图像并打乱顺序
摘要: import tensorflow as tf import os from matplotlib import pyplot as plt import numpy as np from sklearn.utils import shuffle import skimage.io as io de 阅读全文
posted @ 2020-04-14 16:18 任重道远-HSY 阅读(215) 评论(0) 推荐(0)
 

2020年3月16日

多重区间覆写与插入
摘要: list<int> coll1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; vector<int> coll2; //错误,该算法执行的是覆写动作,而非安插动作,所有目标区间必须有足够的元素被覆写; copy(coll1.cbegin(), coll1.cend(), // s 阅读全文
posted @ 2020-03-16 09:48 任重道远-HSY 阅读(167) 评论(0) 推荐(0)
 
区间find(查找)和revers(反转)
摘要: find和reverse #include <algorithm> #include <list> #include <iostream> using namespace std; int main() { list<int> coll; // insert elements from 20 to 阅读全文
posted @ 2020-03-16 09:15 任重道远-HSY 阅读(212) 评论(0) 推荐(0)
 

2020年3月7日

算法
摘要: 一.count函数 algorithm头文件定义了一个count的函数,返回这个值出现次数的统计结果。 count : 在序列中统计某个值出现的次数 c=count(a.begin() , a.end() , x);//返回元素值为x的元素个数。 #include <iostream> #inclu 阅读全文
posted @ 2020-03-07 15:24 任重道远-HSY 阅读(156) 评论(0) 推荐(0)
 
上一页 1 2 3 4 5 6 7 8 ··· 19 下一页