模型类报错
一丛猫
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
tensorflow2 中tensor转为numpy
tensorflow2 中tensor转为numpy 第一种使用with import tensorflow as tf Test = tf.Variable(10, dtype=tf.int32) with tf.compat.v1.Session() as sess: sess.run(tf.compat.v1.global_variables_initializer()) nd_Test = sess.run(Test) #nd_Test就是ndarray类型,转载 2022-04-21 16:27:34 · 3862 阅读 · 0 评论 -
【深度学习模型错误】
问题描述 跑SwinTransformer模型时出现如下错误: TypeError: Failed to convert object of type <class ‘list’> to Tensor. Contents: [None, 3136, 96]. Consider casting elements to a supported type. B, H, W, C = x.shape # [B, H, W, C] -> [B, H*W, C] x = tf.reshape(x原创 2022-04-21 15:56:31 · 2420 阅读 · 0 评论
分享