mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-11-09 15:54:02 +01:00
Start making changes to enable multi-GPU, beginning with simple_ptycho
This commit is contained in:
1 parent
978c9d3206
commit
1a34aaef60
3 files changed
+49
-49
No files matched your search
@@ -8,10 +8,14 @@ dataset = cdtools.datasets.Ptycho2DDataset.from_cxi(filename)
|
||||
# Next, we create a ptychography model from the dataset
|
||||
model = cdtools.models.SimplePtycho.from_dataset(dataset)
|
||||
|
||||
model.to(device='cuda:0')
|
||||
dataset.get_as(device='cuda:0')
|
||||
|
||||
# Now, we run a short reconstruction from the dataset!
|
||||
for loss in model.Adam_optimize(20, dataset):
|
||||
print(model.report())
|
||||
|
||||
print(model.save_results().keys())
|
||||
# Finally, we plot the results
|
||||
model.inspect(dataset)
|
||||
model.compare(dataset)
|
||||
|
||||
Reference in new issue
Block a user