Description
tensorflow/tfjs-core#1455 introduced an unnecessary strict Content-Type check that broke several users (and use-cases).
We should not be strict about the Content-Type and ONLY report it to the user IF we fail to parse the weight/topology in order to help them debug the issue.
Broken use-cases include:
- A server that was serving the weights with Content-Type
text/html
and the user is in no control of the content-type. - Our Keras models on GCP (e.g. MobileNet 1.0 224) serve
model.json
asapplication/octet-stream
, however we fail because we expectapplication/json
.