image_ops_double_test.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:imperative 作者: yaroslavvb 项目源码 文件源码
def testConvertBetweenInteger(self):
    try:
      # Make sure converting to between integer types scales appropriately
      with self.test_session():
        self._convert([0, 255], dtypes.uint8, dtypes.int16, [0, 255 * 128])
        self._convert([0, 32767], dtypes.int16, dtypes.uint8, [0, 255])
        # itensor is tf.int32, but attr "T" is set to tf.int16
    except:
      import pdb;
      pdb.post_mortem()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号