Compute the generalisation gap: validation loss minus training loss.
Implement solve(train_loss, val_loss).
Returns. Return a float. A positive gap means the model does worse on validation data than on training data.
Example 1
Input:
solve(0.4, 0.6)
Output:
0.2
Example 2
Input:
solve(0.8, 0.7)
Output:
-0.1
No results yet
Run your code to check it against the examples, or submit to run every test.