MCPcopy Index your code
hub / github.com/tensorflow/tfjs-examples / getImageSize

Method getImageSize

electron/image_classifier.js:172–181  ·  view source on GitHub ↗

Get the required image sizes (height and width).

()

Source from the content-addressed store, hash-verified

170
171 /** Get the required image sizes (height and width). */
172 getImageSize() {
173 if (this.model == null) {
174 throw new Error(
175 `Model is not loaded yet. Call ensureModelLoaded() first.`);
176 }
177 return {
178 height: this.model.inputs[0].shape[1],
179 width: this.model.inputs[0].shape[2]
180 }
181 }
182
183 getFileSystemCacheDirectory_() {
184 const path = require('path');

Callers 1

searchFromFilesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected