@@ -123,20 +123,21 @@ def main():
123123 isocenter_distance = 400.0
124124
125125 device = torch .device ('cuda' if torch .cuda .is_available () else 'cpu' )
126- phantom_torch = torch .tensor (phantom_cpu , device = device )
126+ phantom_torch = torch .tensor (phantom_cpu , device = device , dtype = torch . float32 )
127127
128128 # Generate the "real" sinogram
129- real_sinogram = ConeProjectorFunction .apply (phantom_torch , angles_np ,
129+ angles_torch = torch .tensor (angles_np , device = device , dtype = torch .float32 )
130+ real_sinogram = ConeProjectorFunction .apply (phantom_torch , angles_torch ,
130131 det_u , det_v , du , dv ,
131132 source_distance , isocenter_distance )
132133
133134 pipeline_instance = Pipeline (lr = 1e-1 ,
134- volume_shape = (Nz ,Ny ,Nx ),
135- angles = angles_np ,
136- det_u = det_u , det_v = det_v ,
137- du = du , dv = dv ,
138- source_distance = source_distance ,
139- isocenter_distance = isocenter_distance ,
135+ volume_shape = (Nz ,Ny ,Nx ),
136+ angles = angles_torch ,
137+ det_u = det_u , det_v = det_v ,
138+ du = du , dv = dv ,
139+ source_distance = source_distance ,
140+ isocenter_distance = isocenter_distance ,
140141 device = device , epoches = 1000 )
141142
142143 ini_guess = torch .zeros_like (phantom_torch )
0 commit comments