Ahh, sorry, I just corrected the code above - please can you try:
var tf = require("tensorflow").create(2048, E.toString(model));
What happens is require("Storage").read("mytfmodel") doesn't actually read the file out of Storage, it returns a special variable type which points to it in external memory - it's so you can for instance write images to the Bangle's screen than are bigger than would fit in RAM.
You just need to force Espruino to load the file into RAM, which you can do with E.toString
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ahh, sorry, I just corrected the code above - please can you try:
What happens is
require("Storage").read("mytfmodel")
doesn't actually read the file out of Storage, it returns a special variable type which points to it in external memory - it's so you can for instance write images to the Bangle's screen than are bigger than would fit in RAM.You just need to force Espruino to load the file into RAM, which you can do with
E.toString