t.getElementById('result');
	let labels, net;

	const error = (err) => {
		resultText.innerHTML = `Error: ${err}`;
		throw new Error(err);
	}

	const getDevice = async () => {
		if (!navigator.gpu) error("WebGPU not supported.");
		const adapter = await navigator.gpu.requestAdapter();
		return await adapter.requestDevice({
			requiredFeatures: ["shader-f16"],
			powerPreference: "high-performance"
		});
	};

	const timer = async (func, label = "") => {
		document.getElementById('time').innerHTML = "";
		con