Great questions.

1) Why is there no argument attached to lambda (before the ':')

This happens when the lambda function doesn't take any input. It always has the same output, which is **loss_function(params)**

Some examples to illustrate:

lambda x: x +5 is a function which takes an input, adds 5 and outputs it.

lambda : 5 is a function which always returns 5.

2) Where does the function '*print_results()' come from? it's not a built-in function the way that print() is. Correct me if I'm wrong..*

You're right! It's predefined in DataCamp beforehand, just like plot_results in the lesson just before this one.

]]>1) Why is there no argument attached to lambda (before the ':')

2) Where does the function '*print_results()' come from? it's not a built-in function the way that print() is. Correct me if I'm wrong..*

exercise here: https://campus.datacamp.com/courses/introduction-to-tensorflow-in-python/63343?ex=10

Why is it not:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Define the linear regression model

def linear_regression(params, feature1 = size_log, feature2 = bedrooms):

return params + feature1*params + feature2*params

# Define the loss function

def loss_function(params, targets = price_log, feature1 = size_log, feature2 = bedrooms):

# Set the predicted values

predictions = linear_regression(params, feature1, feature2)

# Use the mean absolute error loss

return keras.losses.mae(targets, predictions)

# Define the optimize operation

opt = keras.optimizers.Adam()

# Perform minimization and print trainable variables

for j in range(10):

opt.minimize(lambda: loss_function(params), var_list=)

print_results(params)