Skip to content

Commit c8b1a38

Browse files
committed
set cpu to before creating the birds
1 parent b460d80 commit c8b1a38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/NeuroEvolution-flappy-bird/sketch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ let pipes = [];
33

44
function setup() {
55
createCanvas(640, 240);
6+
ml5.tf.setBackend("cpu");
67
for (let i = 0; i < 200; i++) {
78
birds[i] = new Bird();
89
}
910
pipes.push(new Pipe());
10-
ml5.tf.setBackend("cpu");
1111
}
1212

1313
function draw() {

0 commit comments

Comments
 (0)