Skip to content

Commit b56bdb1

Browse files
authored
Update README.md
1 parent 5dc6c09 commit b56bdb1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ model = to_float(model)
789789
input_mat = input_mat.unsqueeze(0)
790790
total_count = total_count.unsqueeze(0) if total_count is not None else None #add batch dimension
791791

792+
#you can apply patch-wise mask into input_mat before you send into the model to test the model's masked region reconstruction capacity.
792793
output = model(input_mat,total_count)
793794

794795
def convert_rgb(data,max_value):
@@ -805,12 +806,13 @@ def convert_rgb(data,max_value):
805806
data_rgb = data_rgb.transpose(1,2,0)
806807
data_rgb = (data_rgb*255).astype(np.uint8)
807808
return data_rgb
809+
808810
reconstruction = output[0,:,:].cpu().detach().numpy()
809811
reconstruction = reconstruction.astype(np.uint8)
810812
reconstruction = reconstruction.transpose(1,2,0)#sawp (C,H,W) to (H,W,C)
811813
fig, axes = plt.subplots(1, 2, figsize=(10, 5))
812814
axes[0].imshow(convert_rgb(input_vis, 20))
813-
axes[0].set_title("Input (1000 loci at 5kb)")
815+
axes[0].set_title("Input")
814816
axes[1].imshow(reconstruction)
815817
axes[1].set_title("Output")
816818
plt.tight_layout()

0 commit comments

Comments
 (0)