text
text copied to clipboard
Making text a first-class citizen in TensorFlow.
No public description FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/text/pull/1266 from 8bitmp3:fix-transformer fca8889d8e304d85173eec394be81c74453da639
@MarkDaoust @markmcd Also addresses https://github.com/tensorflow/text/issues/1264
Gets stuck on this block of code `embed_pt = PositionalEmbedding(vocab_size=tokenizers.pt.get_vocab_size(), d_model=512) embed_en = PositionalEmbedding(vocab_size=tokenizers.en.get_vocab_size(), d_model=512) pt_emb = embed_pt(pt) en_emb = embed_en(en`
Hello, I got stuck halfway through in the nmt_with_attention Colab: ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [](https://localhost:8080/#) in () ----> 1 logits = decoder(ex_context, ex_tar_in) 2 3 print(f'encoder...
``` class PositionalEmbedding(tf.keras.layers.Layer): def __init__(self, vocab_size, d_model): super().__init__() self.d_model = d_model self.embedding = tf.keras.layers.Embedding(vocab_size, d_model, mask_zero=True) self.pos_encoding = positional_encoding(length=2048, depth=d_model) def compute_mask(self, *args, **kwargs): return self.embedding.compute_mask(*args, **kwargs) def call(self, x):...
First, Great job!! 🙌 Next, I've been trying to install tensorflow-text on my windows 11 laptop but been getting these errors: - **with pip**: ERROR: Could not find a version...
``` class MyModel(tf.keras.Model): def __init__(self, vocab_size, embedding_dim, rnn_units): super().__init__(self) self.embedding = tf.keras.layers.Embedding(vocab_size, embedding_dim) self.gru = tf.keras.layers.GRU(rnn_units, return_sequences=True, return_state=True) self.dense = tf.keras.layers.Dense(vocab_size) def call(self, inputs, states=None, return_state=False, training=False): x = inputs...
I am getting an error in the decoder inference part. InvalidArgumentError Traceback (most recent call last) [](https://localhost:8080/#) in () 1 # Setup the loop variables. ----> 2 next_token, done, state...
import tensorflow as tf print("TensorFlow version:", tf.__version__) It printed TensorFlow version : 2.16.1 Now, as mentioned in the heading of readme for tensorflow==2.3.x use tensorflow_text==2.3.x I used pip install tensorflow_text==2.16.1...
GenerateText method in "image_captioning" in https://www.tensorflow.org/text/tutorials/image_captioning have no attribute model.