You see nan  values for loss and predict because your Dataset contains missing values.
Therefore you may want to drop missing values or using imputing techniques to replace missing values before  using model.fit.
You can try adding Dataset.dropna(inplace=True) after reading train.csv
Dataset=pd.read_csv('/content/train.csv')
Dataset.dropna(inplace=True)

Please take a look at colab gist 5 that illustrates my findings. Thanks!
(I assumed you are trying kaggle’s titanic dataset )