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

Function loadHeaderValues

mnist-acgan/data.js:66–74  ·  view source on GitHub ↗
(buffer, headerLength)

Source from the content-addressed store, hash-verified

64}
65
66function loadHeaderValues(buffer, headerLength) {
67 const headerValues = [];
68 const headerNumInt32s = headerLength / 4;
69 for (let i = 0; i < headerNumInt32s; i++) {
70 // Header data is stored in-order (aka big-endian)
71 headerValues[i] = buffer.readUInt32BE(i * 4);
72 }
73 return headerValues;
74}
75
76async function loadImages(filename) {
77 const buffer = await fetchOnceAndSaveToDiskWithBuffer(filename);

Callers 2

loadImagesFunction · 0.70
loadLabelsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected