上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 29 下一页
摘要: 数据统计 功能函数代码范数计算tf.norm(x,ord)最值tf.reduce_max(x,axis)、 tf.reduce_min(x,axis)均值tf.reduce_mean(x,axis)和tf.reduce_sum(x,axis)返回统计最值索引tf.argmax(x, axis),tf 阅读全文
posted @ 2020-09-02 20:44 kuanleung 阅读(42) 评论(0) 推荐(0)
摘要: 声明:代码仅作学习交流用途,代码分享者与创作者不承担任何由他人恶意运行而导致的责任,勿擅自修改限制频率的参数,勿恶意攻击网页,请学习浏览者遵守社会公德与法律秩序,爬虫导致的网页崩溃等损失由计算机操作者负全部责任,造成严重后果的需要承担刑事责任 爬虫代写:邮箱 leon_leon@yeah.net # 阅读全文
posted @ 2020-09-02 10:30 kuanleung 阅读(42) 评论(0) 推荐(0)
摘要: import time #from os import system import os runing = True while runing: inputs =input('关机(s),重启(r)') inputs = inputs.lower() if inputs == 's': print( 阅读全文
posted @ 2020-08-31 20:15 kuanleung 阅读(15) 评论(0) 推荐(0)
摘要: 网易: http://mirrors.163.com/ubuntu-releases/ 首都在线科技股份有限公司: http://mirrors.yun-idc.com/ubuntu-releases/ 阿里云: http://mirrors.aliyun.com/ubuntu-releases/ 阅读全文
posted @ 2020-08-28 11:29 kuanleung 阅读(39) 评论(0) 推荐(0)
摘要: 在打开电脑,会出现选择系统。第1个位置是Ubuntu,第5个是windows系统,ubuntu16版本设置在/boot/grub/grub.cfg文件的 set default = '0' ,修改为 set default = '4' 如果无法改动,需要设置写入权限,在终端执行 sudo chmod 阅读全文
posted @ 2020-08-28 11:22 kuanleung 阅读(17) 评论(0) 推荐(0)
摘要: 合并与分割 功能代码函数合并之拼接tf.concat(tensors,axis)合并之堆叠tf.stack(tensors, axis)分割tf.split(x,num_or_size_split,axis)分割tf.unstack(x,axis) 合并 拼接 tf.concat(tensors,a 阅读全文
posted @ 2020-08-25 08:58 kuanleung 阅读(36) 评论(0) 推荐(0)
摘要: 数学运算 功能代码函数加tf.add减tf.subtract乘tf.multiply除tf.divide整除//余除%乘方**或者 tf.pow(x, a)矩阵乘法@平方和tf.square(x)平方根tf.sqrt(x)自然指数etf.exp(x)自然对数tf.math.log() 简单运算 im 阅读全文
posted @ 2020-08-23 10:49 kuanleung 阅读(17) 评论(0) 推荐(0)
摘要: 张量的变换 功能代码改变视图tf.reshape(x,shape)增加维度tf.expand_dims(x, axis)删除维度tf.squeeze(x, axis)交换维度tf.transpose(x, perm)复制数据tf.tile(x, multiples) 改变视图 tf.reshape( 阅读全文
posted @ 2020-08-22 18:47 kuanleung 阅读(49) 评论(0) 推荐(0)
摘要: 数据索引与切片 索引 通过随机数模拟输入x为 5张6 × 6大小的彩色图片, 张量表达为x[5,6,6,3]x[k][m][n][h] 与 x[k,m,n,h]表达方式等价 import tensorflow as tf x = tf.random.normal([5,6,6,3]) print(x 阅读全文
posted @ 2020-08-22 15:05 kuanleung 阅读(25) 评论(0) 推荐(0)
摘要: 张量的应用 标量 简单 向量 用于b向量的构建 矩阵 多个样本的计算 矩阵运算例子: import tensorflow as tf x = tf.random.normal([3,4]) #模拟3个样本4个特征的输入数据 w = tf.ones([4,3]) #权重 b = tf.zeros([3 阅读全文
posted @ 2020-08-22 14:38 kuanleung 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 29 下一页