In December 2017, this code did the job perfectly. However, after updating Deeplearn.js to the latest version, it no longer functions as expected:
math.scope(function(keep, track) {
var i = track(dl.Array3D.fromPixels(rawImageData, 4));
i = math.multiply(i, track(dl.Scalar.new(1/255, "float32")));
[ . . . ]
}
Now, it throws an error saying:
The dtypes of the first (int32) and second (float32) input must match
Is there a way to convert my image into float32 values ranging from 0.0 to 1.0?