Dealing with MNIST image data in Tensorflow.js
There's the joke that 80 percent of data science is cleaning the data and 20 percent is complaining about cleaning the data ... data cleaning is a much higher proportion of data science than an outsider would expect. Actually training models is typically a relatively small proportion (less than 10 percent) of what a machine learner or data scientist does. Manipulating data is a crucial step step for any machine learning problem. First the code imports tensorflow (make sure you're transpiling your code!), and establishes some constants, including: For the purposes of getting started, this article will only step through the load function. The Image object is a native DOM function that represents an image in memory, and it provides callbacks for when the image is loaded along with access to the image attributes.
Sep-16-2018, 23:37:58 GMT
- Technology: