tf
- tf.Tensor
- tf.constant
- tf.Variable
- tf.identity()
- tf.boolean_mask
- tf.one_hot
- tf.meshgrid() 构建n维网格
- @tf.function
- tf.print()
- tf.while_loop循环语句
- tf.TensorArray(tensor动态数组)
- tf.cond判断tensor的值
- tf.convert_to_tensor
- tf.py_function
矩阵操作
矩阵索引操作
切片
- tf.slice
- tf.strided_slice
- tf.gather
维度操作:
张量操作:
https://www.cnblogs.com/fwl8888/p/9791879.html
tf.data
数据处理
tensorflow新增加了 tf.data 模块,提供更加强大的 读取数据 功能
tf.data模块可以 方便 且 快速 的的 读取数据、处理数据
tf.io
- tf.io.read_file()
- tf.io.decode_jpeg()
- tf.io.encode_jpeg()
- tf.io.write_file()
- tf.io.FixedLenFeature
- tf.io.VarLenFeature
- tf.io.parse_single_example
- tf.io.TFRecordWriter
tf.io.gfile
tf.image
- tf.image.convert_image_dtype()
- tf.image.rgb_to_grayscale()
- tf.image.resize()改变图像大小
- tf.image.extract_patches提取图片区域
- tf.image.non_max_suppression()非极大值抑制
更多图像处理参见:
https://www.cnblogs.com/kuaizifeng/archive/2018/08/17/9490669.html
tf.math
跟数学计算相关的操作,其很多别名都省略math,如:tf.add
- tf.math.add(tf.add)
- tf.math.add_n()
- tf.math.argmax()
- tf.math.reduce_mean()
- tf.math.reduce_sum(tf.reduce_sum)
- tf.math.exp(tf.exp)
- tf.math.sigmoid(tf.sigmoid)
- tf.math.less_equal 小于等于运算
- tf.math.less 小于运算
- tf.math.greater_equal 大于等于运算
- tf.math.greater 大于运算
tf.train
- tf.train.Example
- tf.train.Features
- tf.train.Feature
- tf.train.BytesList
- tf.train.FloatList
- tf.train.Int64List
tf.nn
用于原始神经网络(Neural Net)操作的包装器