我想通过函数tf.cast()将word_embeddings数据类型从float32_ref修改为float32
word_embeddings_modify=tf.cast(word_embeddings,dtype=tf.float32)但它并没有像预期的那样工作,word_embeddings_modify dtype仍然是tf.float32_ref。
word_embeddings = tf.scatter_nd_update(var_output, error_word_f,sum_all)
word_embeddings_modify=tf.cast(word_embeddings,dtype=tf.float32)
word_embeddings_dropout = tf.nn.dropout(word_embeddings_2, dropout_pl)发布于 2019-01-06 20:37:06
可以使用tf.identity取消对_ref类型的引用
word_embeddings = tf.identity(word_embeddings)https://stackoverflow.com/questions/54059805
复制相似问题