NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#Tokenize your data using TextVectorization or another tokenizer
train_input_ids = tokenizer(df['question'])
train_output_ids = tokenizer(df['answer'])

# Prepare decoder input and target sequences
decoder_input_ids = train_output_ids[:, :-1]
decoder_target_ids = train_output_ids[:, 1:]

# Create encoder and decoder models
encoder = encoder(vocab_size, num_layers, units, d_model, num_heads, dropout) # Your encoder model
decoder = decoder(vocab_size, num_layers, units, d_model, num_heads, dropout)# Your decoder model


---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-18-2a344f922962> in <cell line: 10>()
8
9 # Create encoder and decoder models
---> 10 encoder = encoder(vocab_size, num_layers, units, d_model, num_heads, dropout) # Your encoder model
11 decoder = decoder(vocab_size, num_layers, units, d_model, num_heads, dropout)# Your decoder model
12

1 frames
/usr/local/lib/python3.10/dist-packages/keras/engine/input_spec.py in assert_input_compatibility(input_spec, inputs, layer_name)
217
218 if len(inputs) != len(input_spec):
--> 219 raise ValueError(
220 f'Layer "{layer_name}" expects {len(input_spec)} input(s),'
221 f" but it received {len(inputs)} input tensors. "

ValueError: Layer "encoder" expects 2 input(s), but it received 1 input tensors. Inputs received: [<tf.Tensor: shape=(), dtype=int32, numpy=997>]
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.