Skip to content

Commit bc13d21

Browse files
committed
Remove CPU mode in tensorflow example
1 parent 1346b94 commit bc13d21

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

examples/DeepLabv3/web_app_tfjs/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ <h3>Controls</h3>
4444
style="width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #ddd;">
4545
<option value="webgpu">WebGPU (GPU - Fastest)</option>
4646
<option value="webgl" selected>WebGL (GPU)</option>
47-
<option value="cpu">CPU</option>
4847
</select>
4948
</div>
5049
<button id="webcam-btn" class="btn primary" disabled>Start Webcam</button>

examples/DeepLabv3/web_app_tfjs/script.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ const fpsEl = document.getElementById('fps-counter');
3434
// Initialization
3535
async function init(backend = 'webgl') {
3636
try {
37+
// Enable production mode for performance
38+
tf.enableProdMode();
39+
3740
webcamBtn.disabled = true;
3841
updateStatus(`Initializing ${backend}...`, 'loading');
3942

examples/DeepLabv3/web_app_tfjs/tfjs_model/model.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)