mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-11-18 03:44:07 +01:00
added ePIE
This commit is contained in:
1 parent
fcf17d9355
commit
84ac2cc058
2 files changed
+32
-16
No files matched your search
@@ -7,9 +7,11 @@ import h5py
|
||||
import torch as t
|
||||
import numpy as np
|
||||
|
||||
filename = '../../../Projects/CSX_3_19/cxis/processed/114429_p.cxi'
|
||||
filename = '../../../Projects/CSX_3_19/cxis/processed/115145_p.cxi'
|
||||
filename = '../../../Downloads/AuBalls_700ms_30nmStep_3_3SS_filter.cxi'
|
||||
|
||||
filename = '../../Downloads/114429_p.cxi'
|
||||
#filename = '../../../Projects/CSX_3_19/cxis/processed/114429_p.cxi'
|
||||
#filename = '../../../Projects/CSX_3_19/cxis/processed/115145_p.cxi'
|
||||
#filename = '../../../Downloads/AuBalls_700ms_30nmStep_3_3SS_filter.cxi'
|
||||
|
||||
|
||||
with h5py.File(filename,'r') as f:
|
||||
@@ -21,12 +23,12 @@ model = CDTools.models.SimplePtycho.from_dataset(dataset)
|
||||
|
||||
# Uncomment these to use on the CPU
|
||||
# default is CPU with 32-bit floats
|
||||
model.to(device='cuda')
|
||||
#model.to(device='cuda')
|
||||
#dataset.to(device='cuda')
|
||||
dataset.get_as(device='cuda')
|
||||
#dataset.get_as(device='cuda')
|
||||
|
||||
|
||||
for loss in model.ePIE(100, dataset):
|
||||
for loss in model.ePIE(1, dataset):
|
||||
print(loss)
|
||||
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
Reference in new issue
Block a user