AttributeError: 'numpy.ndarray' object has no attribute '_keras_mask' when calling model.call()

Full code example: #!/usr/bin/env python3import numpy as npimport tensorflow as tffrom tens - Pastebin.com

The model takes three input tensors and produces two “one hot” output tensors. From python, I want to perform an inference on a model using random input data (yes, this sounds weird, but just go with it - the image data will NOT come from files on disk). The model that I want to use is actually more complex (5 inputs, 4 outputs), so i reduced it for the sake of this post.

When I call “model.call(inputs)”, I get a python exception AttributeError: 'numpy.ndarray' object has no attribute '_keras_mask'. I assume that I’m just not using the correct syntax to pass the numpy arrays into the “call()” method.

What changes need to be made to the code (in pastebin) so that the call to “call()” will succeed. Thank you for your time.

Hi @One_Hit_Toaster

Welcome to the TensorFlow Forum!

The given code is not correct for the objective and dataset type you mentioned. As you have dataset with multiple inputs and outputs to train the model, I suggest you to refer this Tensorflow doc where it has properly elaborated how to construct the model to pass the multi-inputs and multi-output data.

Please let us know in case issue/error still persists. Thank you.