[19:26]But I get this error!
Please help me.
Epoch 1/1000
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-2-8309fc54a25a> in <module>()
8 ys=[2, 4, 6]
9
---> 10 model.fit(xs, ys, epochs=1000)
11
12 print(model.predict([7]))
10 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/func_graph.py in wrapper(*args, **kwargs)
966 except Exception as e: # pylint:disable=broad-except
967 if hasattr(e, "ag_error_metadata"):
--> 968 raise e.ag_error_metadata.to_exception(e)
969 else:
970 raise
ValueError: in user code:
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:571 train_function *
outputs = self.distribute_strategy.run(
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:951 run **
return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2290 call_for_each_replica
return self._call_for_each_replica(fn, args, kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2649 _call_for_each_replica
return fn(*args, **kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:533 train_step **
y, y_pred, sample_weight, regularization_losses=self.losses)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/compile_utils.py:187 __call__
self._build(y_pred)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/compile_utils.py:140 _build
self._losses = nest.map_structure(self._get_loss_object, self._losses)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/nest.py:617 map_structure
structure[0], [func(*x) for x in entries],
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/nest.py:617 <listcomp>
structure[0], [func(*x) for x in entries],
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/compile_utils.py:264 _get_loss_object
loss = losses_mod.get(loss)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/losses.py:1857 get
return deserialize(identifier)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/losses.py:1835 deserialize
printable_module_name='loss function')
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/generic_utils.py:392 deserialize_keras_object
raise ValueError('Unknown ' + printable_module_name + ':' + object_name)
ValueError: Unknown loss function:mean_square_error