MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / previewImage

Function previewImage

fashion-mnist-vae/data.js:162–166  ·  view source on GitHub ↗

* Preview an image on the console. * * @param {Float32Array} imageData

(imageData)

Source from the content-addressed store, hash-verified

160 * @param {Float32Array} imageData
161 */
162async function previewImage(imageData) {
163 const imageAsJimp = await arrayToJimp(imageData);
164 const pngBuffer = await imageAsJimp.getBufferAsync(jimp.MIME_PNG);
165 console.log(await terminalImage.buffer(pngBuffer));
166}
167
168module.exports = {
169 DATASET_PATH,

Callers 2

generateFunction · 0.85
runFunction · 0.85

Calls 1

arrayToJimpFunction · 0.85

Tested by

no test coverage detected