Created
February 16, 2016 04:12
-
-
Save tachim/1355d51e10befd4fe0ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def render_vector_sparsity(final_z): | |
zb = final_z.copy() | |
zb[zb != 0] = 1 | |
wb = w.copy() | |
wb[wb != 0] = 1 | |
plt.imshow(((zb != wb).reshape((50, 100)))) | |
print (zb != wb).sum(), 'different' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment