2 questions on keras 1

2 Homework Qs all the details is attached

1 HW : just follow the example (lec 12) (just need some modification to fit the HW)

2 HW : I attached my answer I just need you to check it and rewrite it in ipynb file.