快速入门tensorflow1.x_02

版权声明:原创文章转载请注明出处~ https://blog.csdn.net/PecoHe/article/details/89673037

3.TensorFlow中的CV相关核心API总结

TensorFlow中CV相关核心API分为四类:

  • 基本运算
  • 搭建CNN网络
  • 模型训练优化
  • 数据读取相关
import tensorflow as tf

基本运算

tf.expand_dims(input,dim,name=None)
tf.split(split_dim,num_split,value,name='split')
tf.concat(concat_dim,values,name='comcat')
tf.cast()
tf.reshape()
tf.equal()
tf.matmual(a,b)
tf.argmax()
tf.squeeze()

搭建CNN网络(tf.nn)

tf.nn.conv2d()
tf.nn.max_pool()
tf.nn.avg_pool()
tf,nn.relu()
tf.nn.dropout()
tf.nn.l2_normalize()
tf.nn.batch_normalization()
tf.nn.l2_loss()
tf.nn.softmax_cross_entropy_with_logits

模型训练优化(tf.train)

tf.train.Saver.save()
tf.train.Saver.restore()
tf.train.GradientDescentOptimize(learning_rate).minimize(loss)
tf.train.expoential_decay()

数据读取相关

tf.train.string_input_prodicer(filenames,num_epochs,shuffle=True)
tf.train.shuffle_batch([example,label],batch_size,capacity,min_after_dequeue)
tf.train.Coordinator()
tf.train.start_queue_runners(sess,coord)

猜你喜欢

转载自blog.csdn.net/PecoHe/article/details/89673037
今日推荐