python 编程
Nr0625
计算成像、数字全息,相位恢复,衍射层析。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python 将print 输出结果保存在txt文件中
在每一个print后的括号里加上 file = f,例如:f = open("output.txt", "w")print(img,file = f)f.close()这里可以不用手动创建output.txt,因为程序会自动创建。原创 2021-06-03 10:45:53 · 17341 阅读 · 2 评论 -
tensorflow清华镜像可以去所给网址下载
https://pypi.tuna.tsinghua.edu.cn/packages/31/6c/c1f6bc2ca251c627976acae937f4f27f7349300e2b69b711e47b092d2642/tensorflow-2.1.0-cp36-cp36m-win_amd64.whl原创 2020-06-26 08:18:25 · 1960 阅读 · 0 评论 -
TensorFlow 基础练习 5 一个简单的回归算法
今天利用TensorFlow实现一个简单的回归算法。1、首先导入库import matplotlib.pyplot as pltimport tensorflow as tfimport numpy as np 2、创建数据集这里使用numpy库生成输入数据 X, 输出数据 Y,并且在生成 Y 时加入了噪声。# 初始化随机种子tf.set_random_seed(1...原创 2018-10-22 19:24:53 · 556 阅读 · 0 评论 -
TensorFlow 基础练习 4 activation 激活函数
1、激活函数 activation对于神经网络算法来说,激活函数是必不可少的一部分,下面将绘制TensorFlow中常用的几个激活函数。 """author:NLP_xiaoyuhttps://blog.youkuaiyun.com/Nr0315Dependencies:tensorflow: 1.10.0matplotlib"""# 绘制不同的激活函数import tenso...原创 2018-10-18 20:17:32 · 509 阅读 · 0 评论 -
TensorFlow 基础练习 3 变量 tf.Variable
1、tf.Variable定义变量张量,使用时使需要与 tf.global_variable_initializer() 联合使用。在定义变量张量后,需要使用 tf.Session().run(tf.global_variable_initializer()) 方可初始化定义变量张量"""author:NLP_xiaoyuhttps://blog.youkuaiyun.com/Nr0315...原创 2018-10-18 19:47:41 · 329 阅读 · 0 评论 -
TensorFlow 基础练习 2 占位符 tf.placeholder
1、占位符:tf.placeholdertf.placeholder( dtype, shape=None, name=None)参数:dtype: 喂入张量的类型. shape: 喂入张量的形状(可选项),如果没有指定,则喂入张量可以为任意形状 name: 定义placeholder 的名字(可选项).返回:一个Tensor,相当于为变量分配了一...原创 2018-10-16 21:40:00 · 1439 阅读 · 0 评论 -
TensorFlow 基础练习 1 矩阵点乘
1、矩阵点乘 # 计算一个矩阵相乘import tensorflow as tfm1 = tf.constant([[1, 2]], dtype=tf.int32) # 定义常量张量大小为 1x2, 类型为 tf.int32m2 = tf.constant([[1], [2]]) # 定义常量张量大小为...原创 2018-10-16 20:54:51 · 946 阅读 · 0 评论 -
剑指offer python实现 66道算法题
所有题目均采用牛客网在线编程实现,代码均在github上。github地址:https://github.com/leeguandong/Interview-code-practice-python/tree/master/%E5%89%91%E6%8C%87offer 数组1.二维数组中的查找题目:在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从...转载 2018-10-08 13:42:05 · 1256 阅读 · 0 评论
分享