Commit 295b870b authored by cc215's avatar cc215 💬
Browse files

ukbb

parent acb63c26
......@@ -149,7 +149,10 @@ class CARDIAC_Predict_DATASET(data.Dataset):
if self.if_z_score:
new_img_slice -= new_input_mean
new_std = np.std(new_img_slice, axis=(1, 2), keepdims=True)
# if abs(new_std-0)<1e-3: new_std=1
if new_img_slice.shape[0]>1:
new_std[abs(new_std-0.)<1e-6]=1
else:
if abs(new_std-0)<1e-3: new_std=1
new_img_slice /= (new_std)
else:
print ('0-1 rescaling')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment