Set gpus=0 in examples

This commit is contained in:
Jensun Ravichandran 2021-05-15 12:43:00 +02:00
parent c639836537
commit ebc42a4aa8
9 changed files with 9 additions and 9 deletions

View File

@ -37,7 +37,7 @@ if __name__ == "__main__":
# Setup trainer # Setup trainer
trainer = pl.Trainer( trainer = pl.Trainer(
gpus=-1, gpus=0,
max_epochs=200, max_epochs=200,
callbacks=[ callbacks=[
dvis, dvis,

View File

@ -34,7 +34,7 @@ if __name__ == "__main__":
# Setup trainer # Setup trainer
trainer = pl.Trainer( trainer = pl.Trainer(
gpus=-1, gpus=0,
max_epochs=50, max_epochs=50,
callbacks=[vis], callbacks=[vis],
) )

View File

@ -35,7 +35,7 @@ if __name__ == "__main__":
# Setup trainer # Setup trainer
trainer = pl.Trainer( trainer = pl.Trainer(
gpus=-1, gpus=0,
max_epochs=200, max_epochs=200,
callbacks=[vis, snan], callbacks=[vis, snan],
) )

View File

@ -29,7 +29,7 @@ if __name__ == "__main__":
prototype_initializer=pt.components.SMI(train_ds)) prototype_initializer=pt.components.SMI(train_ds))
# Setup trainer # Setup trainer
trainer = pl.Trainer(max_epochs=100, gpus=-1) trainer = pl.Trainer(max_epochs=100, gpus=0)
# Training loop # Training loop
trainer.fit(model, train_loader) trainer.fit(model, train_loader)

View File

@ -61,7 +61,7 @@ if __name__ == "__main__":
trainer = pl.Trainer( trainer = pl.Trainer(
max_epochs=50, max_epochs=50,
callbacks=[vis], callbacks=[vis],
gpus=-1, gpus=0,
# overfit_batches=1, # overfit_batches=1,
# fast_dev_run=3, # fast_dev_run=3,
) )

View File

@ -26,7 +26,7 @@ if __name__ == "__main__":
vis = pt.models.VisGLVQ2D(data=(x_train, y_train)) vis = pt.models.VisGLVQ2D(data=(x_train, y_train))
# Setup trainer # Setup trainer
trainer = pl.Trainer(max_epochs=1, callbacks=[vis], gpus=-1) trainer = pl.Trainer(max_epochs=1, callbacks=[vis], gpus=0)
# Training loop # Training loop
# This is only for visualization. k-NN has no training phase. # This is only for visualization. k-NN has no training phase.

View File

@ -34,7 +34,7 @@ if __name__ == "__main__":
vis = pt.models.VisSiameseGLVQ2D(train_ds, border=0.1) vis = pt.models.VisSiameseGLVQ2D(train_ds, border=0.1)
# Setup trainer # Setup trainer
trainer = pl.Trainer(max_epochs=200, callbacks=[vis], gpus=-1) trainer = pl.Trainer(max_epochs=200, callbacks=[vis], gpus=0)
# Training loop # Training loop
trainer.fit(model, train_loader) trainer.fit(model, train_loader)

View File

@ -34,7 +34,7 @@ if __name__ == "__main__":
vis = pt.models.VisNG2D(data=train_ds) vis = pt.models.VisNG2D(data=train_ds)
# Setup trainer # Setup trainer
trainer = pl.Trainer(gpus=-1, max_epochs=200, callbacks=[vis]) trainer = pl.Trainer(gpus=0, max_epochs=200, callbacks=[vis])
# Training loop # Training loop
trainer.fit(model, train_loader) trainer.fit(model, train_loader)

View File

@ -55,7 +55,7 @@ if __name__ == "__main__":
vis = pt.models.VisSiameseGLVQ2D(data=train_ds, border=0.1) vis = pt.models.VisSiameseGLVQ2D(data=train_ds, border=0.1)
# Setup trainer # Setup trainer
trainer = pl.Trainer(max_epochs=100, callbacks=[vis], gpus=-1) trainer = pl.Trainer(max_epochs=100, callbacks=[vis], gpus=0)
# Training loop # Training loop
trainer.fit(model, train_loader) trainer.fit(model, train_loader)