I want to use the modify word_embeddings dtype from float32_ref to float32 through the function tf.cast():
word_embeddings_modify=tf.cast(word_embeddings,dtype=tf.float32)
But it did not work as expected and word_embeddings_modify dtype still 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)
You can dereference a _ref type using tf.identity
word_embeddings = tf.identity(word_embeddings)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With