Week 4 Assignment 2 Exercise 6 Issue

The real problem with getting negative cost values is that mixing integer and float types in TF/Keras has different type coercion rules than it does in python. Here’s a thread which gives details and examples.

1 Like