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

Function prepUI

mnist-transfer-cnn/ui.js:27–35  ·  view source on GitHub ↗
(predict, retrain, testExamples, imageSize)

Source from the content-addressed store, hash-verified

25}
26
27export function prepUI(predict, retrain, testExamples, imageSize) {
28 setPredictFunction(predict, testExamples, imageSize);
29 const imageInput = document.getElementById('image-input');
30 imageInput.value = util.imageVectorToText(testExamples['5_1'], imageSize);
31 predict(imageInput.value);
32 setRetrainFunction(retrain);
33 document.getElementById('retrain').disabled = false;
34 document.getElementById('test-image-select').disabled = false;
35}
36
37export function getImageInput() {
38 return document.getElementById('image-input').value;

Callers

nothing calls this directly

Calls 3

setRetrainFunctionFunction · 0.85
setPredictFunctionFunction · 0.70
predictFunction · 0.50

Tested by

no test coverage detected