Yes, notice that your cost value is much higher than the expected value. There are a number of possible reasons for that, but if you used the dot product with transposes, please have a look at this thread and consider whether that applies in your case.