Make big changes to docs to update the tutorial section, and also to finally autoload the documentation of the models and datasets

This commit is contained in:
Abe Levitan committed 2024-09-01 13:04:28 +02:00
1 parent 30a989fe3e
commit 13a2ba86df
22 files changed
+381 -1532

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
from tutorial_basic_ptycho_dataset import BasicPtychoDataset
from tutorial_simple_ptycho import SimplePtycho
from h5py import File
from matplotlib import pyplot as plt
filename = 'example_data/lab_ptycho_data.cxi'
with File(filename, 'r') as f:
dataset = BasicPtychoDataset.from_cxi(f)
dataset.inspect()
model = SimplePtycho.from_dataset(dataset)
model.to(device='cuda')
dataset.get_as(device='cuda')
for loss in model.Adam_optimize(10, dataset):
model.inspect(dataset)
print(model.report())
model.inspect(dataset)
model.compare(dataset)
plt.show()