1. 학습
  2. /
  3. 강의
  4. /
  5. Introduction to TensorFlow in Python

Connected

연습 문제

Loss functions in TensorFlow

In this exercise, you will compute the loss using data from the King County housing dataset. You are given a target, price, which is a tensor of house prices, and predictions, which is a tensor of predicted house prices. You will evaluate the loss function and print out the value of the loss.

지침 1/2

undefined XP
  • 1

    Import the keras module from tensorflow. Then, use price and predictions to compute the mean squared error (mse).

  • 2

    Modify your code to compute the mean absolute error (mae), rather than the mean squared error (mse).