face-api.js ERROR: Based on the provided shape, [256,128], the tensor should have 32768 values but has 29076

Created on 21 Apr 2020  路  7Comments  路  Source: justadudewhohacks/face-api.js

Hello.
i have a problem with this API. I dont know why, but localhost work very well, but in production not.
I uploaded the files directly to the server

The error says:

tf-core.esm.js:17 Uncaught (in promise) Error: Based on the provided shape, [256,128], the tensor should have 32768 values but has 29076
at g (tf-core.esm.js:17)
at kn (tf-core.esm.js:17)
at In (tf-core.esm.js:17)
at o (tf-core.esm.js:17)
at Ph (tf-core.esm.js:17)
at tf-core.esm.js:17
at Array.forEach ()
at tf-core.esm.js:17
at Array.forEach ()
at tf-core.esm.js:17

i know this error is on side face-api.js, but i don't know how to fix.
i use hostgator to server

Best Regards

Most helpful comment

Hello,
if someone got here with the same problem, in my case, it was working on local but not on hosted. So, after a long time, I've found out the problem was on the ftp transfer.
We must pay atention to transfer the shard files in binary mode. I am using filezila and it was transfering the shards in text mode. Forcing it to binary solved.

All 7 comments

Yes, I have the same issue. Works perfectly on local, but not on production.

For some reason, I think the model did not load all of the content. It should load 2MB instead of bytes.
Screen Shot 2020-06-23 at 19 02 59

i fixed.
i changed the save file.
I moved Model file to the root folder.

Sorry, i don't know if you understand me, because i'm Brazilian. LOL

I understand you just fine. I fixed it too, the model wasn't loading correctly because I misconfigure URL settings so it doesn't load the model. It's a bad error message making us think the error comes from the javascript program.

Hello,
if someone got here with the same problem, in my case, it was working on local but not on hosted. So, after a long time, I've found out the problem was on the ftp transfer.
We must pay atention to transfer the shard files in binary mode. I am using filezila and it was transfering the shards in text mode. Forcing it to binary solved.

Hello,
if someone got here with the same problem, in my case, it was working on local but not on hosted. So, after a long time, I've found out the problem was on the ftp transfer.
We must pay atention to transfer the _shard_ files in binary mode. I am using filezila and it was transfering the shards in text mode. Forcing it to binary solved.

You are right!

Hello,
if someone got here with the same problem, in my case, it was working on local but not on hosted. So, after a long time, I've found out the problem was on the ftp transfer.
We must pay atention to transfer the _shard_ files in binary mode. I am using filezila and it was transfering the shards in text mode. Forcing it to binary solved.

How to do that?

Hello,
if someone got here with the same problem, in my case, it was working on local but not on hosted. So, after a long time, I've found out the problem was on the ftp transfer.
We must pay atention to transfer the _shard_ files in binary mode. I am using filezila and it was transfering the shards in text mode. Forcing it to binary solved.

How to do that?

Hello, using filezilla client, transfer> transfer type > binary

Was this page helpful?
0 / 5 - 0 ratings