记录一下tf里面函数的细节变动
来源:互联网 发布:网络专科和自考专科 编辑:程序博客网 时间:2024/04/29 07:38
最近在用tensorflow写程序的时候,发现一些函数里的细小变动,导致新版本中未完全兼容旧代码,以此文记录,防止再次踩坑,长期更新……目前用的是Tensorflow gpu 1.4.0版本
图像预处理相关函数
tf.image.sample_distorted_bounding_box()
import tensorflow as tf##oldbbox_begin,bbox_size,bbox_for_draw=tf.image.sample_distorted_bounding_box(tf.shape(image),bounding_boxes=bbox)##newbbox_begin,bbox_size,bbox_for_draw=tf.image.sample_distorted_bounding_box(tf.shape(image),bounding_boxes=bbox,min_object_covered=0.1)
坑点:这里我不加显式给min_object_covered就会报ValueError: Tried to convert ‘min_object_covered’ to a tensor and failed. Error: None values not supported. 的错误。
tf.image.resize_images()
import tensorflow as tf##olddistorted_image=tf.image.resize_images(distorted_image,height,width,method=method)##newdistorted_image = tf.image.resize_images(distorted_image, size=[height, width], method=method)
坑点:这里如果不将size写为size=[height,width]的形式就会报TypeError: resize_images() got multiple values for argument ‘method’的错误。
阅读全文
1 0
- 记录一下tf里面函数的细节变动
- 记录一下SQLite里面的 时间日期函数
- 学到一个小细节,记录一下
- 说一下避免软件需求变动的另一种方法
- 运算关系里面的细节
- Qt里面的一些细节
- 回顾一下基础的细节
- 个人笔记-记录一些小的细节即函数用法
- 用到了base64转图片文件的函数,记录一下
- tf.get_variable函数的使用
- tf.Variable函数的用法
- tf.unpack函数的用法
- tf.add_n函数的用法
- tf.split函数的用法
- tf.transpose函数的用法
- tf.get_variable函数的使用
- tf.multinomial()函数的理解
- tf.concat()函数的用法
- 每天一道LeetCode-----找到有多少个组合加起来和是n,每个组合的数字只能是1或者2
- Node.js引用gm包错误Error: Could not execute GraphicsMagick/ImageMagick
- Policy Gradient笔记
- android Handler使用分享
- 浅谈物联网在智慧城市建设中的核心作用
- 记录一下tf里面函数的细节变动
- php归档格式:phar后缀文件详解(创建、使用、解包还原提取)
- IntelliJ IDEA 文档无法编辑的解决办法
- 利用extjs上传文件
- Elasticsearch基础教程
- R-FCN
- PHP 四种排序方法
- hive null处理
- 物联网发展障碍重重?浅谈IOT发展的痛点