Tfjs: spaceToBatchND_ has non-actionable error message

Created on 12 Aug 2018  路  10Comments  路  Source: tensorflow/tfjs

I am trying my first model with dilated convolutions.
tfjs-converter worked without complaints, but when trying to run the model I get:

Error: input spatial dimensions must be divisible by blockShapes

looking at the code around it is unclear what action should be taken to fix the problem.

It would be useful to have the error message report the actual values in place, e.g:

Error: input spatial dimensions ${dimensions} must be divisible by blockShapes ${blockShapes}

and suggest what should be changed to have it fixed.

core ux

All 10 comments

@dikatok could you look into this ?
@dsmilkov

ping ?

Thanks - this is great feedback! Do you have some cycles to send us a PR?

Whoops sorry, I missed this issue. Is this resolved yet? If not, I will look into it.

@dikatok looks like the issue is still open. So your input is most welcome !

Gotcha

Thanks @dikatok

Can it be that the failing line
return a && (b % blockShape[i - 1] === 0);
should also account for the paddings as mentioned in the comments of the function?

@stefano-1981 yup

I changed the error messages to be more elaborate and included the paddings in the assertion

Now that the fix is merged I think this issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Josef-Haupt picture Josef-Haupt  路  3Comments

dhrumil83 picture dhrumil83  路  3Comments

ritikrishu picture ritikrishu  路  4Comments

Umar24129 picture Umar24129  路  3Comments

chrisdonahue picture chrisdonahue  路  3Comments