I figured this method is somehow invoked when model.fit() is called which I’m trying to figure out how to do and in the process it turns out the call method’s signature is wrong according to the documentation it must be:
def call(self, inputs, training=None, mask=None)
When I try to call model.fit() with some inputs (probably wrong shape) I get the following error:
Models passed to `fit` can only have `training` and the first argument in `call()` as positional arguments, found: ['output_sentance', 'enc_padding_mask', 'look_ahead_mask', 'dec_padding_mask'].
Is my assumption for the method’s signature correct? Also I would appreciate any help in my attempt to train the transformer model implemented in the notebook with the simplest dataset possible.
Thanks for the clarification. You’re right. I was not correct to assume the call method signature is wrong since it’s being invoked only from code we’ve written. Still I’m curious if it’s possible this transformer model to be trained using model.fit() or a custom training loop is required for that?