Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Fix MAP inference
Browse files Browse the repository at this point in the history
  • Loading branch information
StannisZhou authored Dec 3, 2021
1 parent c4298a3 commit 3a91eec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/rcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,18 +348,18 @@ def get_bu_msg(img: np.ndarray) -> np.ndarray:
fig, ax = plt.subplots(1, 2, figsize=(20, 10))
ax[0].imshow(r_test_img, cmap="gray")
ax[0].axis("off")
ax[0].set_title("Input image", fontsize=20)
ax[0].set_title("Input image", fontsize=40)
for i in range(r_bu_msg.shape[0]):
img[r_bu_msg[i] > 0] = 0

ax[1].imshow(img, cmap="gray")
ax[1].axis("off")
ax[1].set_title("Max filter response across 16 channels", fontsize=20)
ax[1].set_title("Max filter response across 16 channels", fontsize=40)
fig.tight_layout()


# %% [markdown]
# ## 5.2 Run maximum a-posteriori probability (map) inference on all test images
# ## 5.2 Run MAP inference on all test images

# %%
def get_evidence(bu_msg: np.ndarray, frc: np.ndarray) -> np.ndarray:
Expand Down

0 comments on commit 3a91eec

Please sign in to comment.