Set gpus=0 in examples
This commit is contained in:
parent
c639836537
commit
ebc42a4aa8
@ -37,7 +37,7 @@ if __name__ == "__main__":
|
||||
|
||||
# Setup trainer
|
||||
trainer = pl.Trainer(
|
||||
gpus=-1,
|
||||
gpus=0,
|
||||
max_epochs=200,
|
||||
callbacks=[
|
||||
dvis,
|
||||
|
@ -34,7 +34,7 @@ if __name__ == "__main__":
|
||||
|
||||
# Setup trainer
|
||||
trainer = pl.Trainer(
|
||||
gpus=-1,
|
||||
gpus=0,
|
||||
max_epochs=50,
|
||||
callbacks=[vis],
|
||||
)
|
||||
|
@ -35,7 +35,7 @@ if __name__ == "__main__":
|
||||
|
||||
# Setup trainer
|
||||
trainer = pl.Trainer(
|
||||
gpus=-1,
|
||||
gpus=0,
|
||||
max_epochs=200,
|
||||
callbacks=[vis, snan],
|
||||
)
|
||||
|
@ -29,7 +29,7 @@ if __name__ == "__main__":
|
||||
prototype_initializer=pt.components.SMI(train_ds))
|
||||
|
||||
# Setup trainer
|
||||
trainer = pl.Trainer(max_epochs=100, gpus=-1)
|
||||
trainer = pl.Trainer(max_epochs=100, gpus=0)
|
||||
|
||||
# Training loop
|
||||
trainer.fit(model, train_loader)
|
||||
|
@ -61,7 +61,7 @@ if __name__ == "__main__":
|
||||
trainer = pl.Trainer(
|
||||
max_epochs=50,
|
||||
callbacks=[vis],
|
||||
gpus=-1,
|
||||
gpus=0,
|
||||
# overfit_batches=1,
|
||||
# fast_dev_run=3,
|
||||
)
|
||||
|
@ -26,7 +26,7 @@ if __name__ == "__main__":
|
||||
vis = pt.models.VisGLVQ2D(data=(x_train, y_train))
|
||||
|
||||
# Setup trainer
|
||||
trainer = pl.Trainer(max_epochs=1, callbacks=[vis], gpus=-1)
|
||||
trainer = pl.Trainer(max_epochs=1, callbacks=[vis], gpus=0)
|
||||
|
||||
# Training loop
|
||||
# This is only for visualization. k-NN has no training phase.
|
||||
|
@ -34,7 +34,7 @@ if __name__ == "__main__":
|
||||
vis = pt.models.VisSiameseGLVQ2D(train_ds, border=0.1)
|
||||
|
||||
# Setup trainer
|
||||
trainer = pl.Trainer(max_epochs=200, callbacks=[vis], gpus=-1)
|
||||
trainer = pl.Trainer(max_epochs=200, callbacks=[vis], gpus=0)
|
||||
|
||||
# Training loop
|
||||
trainer.fit(model, train_loader)
|
||||
|
@ -34,7 +34,7 @@ if __name__ == "__main__":
|
||||
vis = pt.models.VisNG2D(data=train_ds)
|
||||
|
||||
# Setup trainer
|
||||
trainer = pl.Trainer(gpus=-1, max_epochs=200, callbacks=[vis])
|
||||
trainer = pl.Trainer(gpus=0, max_epochs=200, callbacks=[vis])
|
||||
|
||||
# Training loop
|
||||
trainer.fit(model, train_loader)
|
||||
|
@ -55,7 +55,7 @@ if __name__ == "__main__":
|
||||
vis = pt.models.VisSiameseGLVQ2D(data=train_ds, border=0.1)
|
||||
|
||||
# Setup trainer
|
||||
trainer = pl.Trainer(max_epochs=100, callbacks=[vis], gpus=-1)
|
||||
trainer = pl.Trainer(max_epochs=100, callbacks=[vis], gpus=0)
|
||||
|
||||
# Training loop
|
||||
trainer.fit(model, train_loader)
|
||||
|
Loading…
Reference in New Issue
Block a user