Recall & Review
beginner
What is a multi-input model in machine learning?
A multi-input model is a model that takes more than one input data source at the same time to make predictions. For example, it can use both images and text together.
Click to reveal answer
beginner
What does a multi-output model do?
A multi-output model produces more than one prediction or output from the same input data. For example, it can predict both the price and the category of a house from its features.
Click to reveal answer
intermediate
How do you define multiple inputs in TensorFlow's Keras API?
You create separate Input layers for each input and then combine them in the model. For example, input1 = tf.keras.Input(shape=(10,)) and input2 = tf.keras.Input(shape=(5,)).
Click to reveal answer
intermediate
How can you compile a multi-output model with different losses for each output?
You pass a dictionary to the loss parameter with keys as output names and values as loss functions. For example, loss={'output1': 'mse', 'output2': 'binary_crossentropy'}.
Click to reveal answer
beginner
Why use multi-input and multi-output models in real life?
They help solve complex problems where data comes from different sources and multiple predictions are needed. For example, a health app might use sensor data and user info to predict heart rate and stress level.
Click to reveal answer
What is the main purpose of a multi-input model?
✗ Incorrect
Multi-input models take more than one input data source to improve predictions.
How do you specify multiple outputs in a Keras model?
✗ Incorrect
You return multiple outputs as a list or dictionary from the model definition.
Which argument allows you to assign different loss functions to each output in Keras?
✗ Incorrect
The loss argument can take a dictionary to assign different losses to each output.
In a multi-input model, how are inputs combined before prediction?
✗ Incorrect
Inputs are merged or concatenated to form a combined representation for prediction.
What is a real-life example of a multi-output model?
✗ Incorrect
Predicting multiple things like price and type from the same data is a multi-output task.
Explain how you would build a simple multi-input model in TensorFlow Keras.
Think about how to handle each input separately and then join them.
You got /4 concepts.
Describe how to train a multi-output model with different loss functions for each output.
Focus on how losses are assigned and how training data is structured.
You got /4 concepts.