- 博客(2)
- 收藏
- 关注
转载 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 3780
原创 【深度学习模型错误】
问题描述 跑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 2153
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人