mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-11-15 18:43:56 +01:00
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:
1 parent
30a989fe3e
commit
13a2ba86df
22 files changed
+381
-1532
No files matched your search
@@ -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()
|
||||
Reference in new issue
Block a user