Created
July 1, 2020 05:09
-
-
Save emuccino/fa83a1bcd398f5f598d14846db0732c5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import matplotlib.pyplot as plt | |
def show_image_compression(samples): | |
#get encoded samples offloaded to edge | |
_, offload_end = device_models['end'].predict(samples) | |
#get encoded samples offloaded to cloud | |
_, offload_edge = device_models['edge'].predict(offload_end) | |
#show sample represenations at each device level | |
for i in range(len(samples)): | |
print(i) | |
for device, img in zip(device_names,[samples[i],offload_end[i],offload_edge[i]]): | |
print(device) | |
plt.imshow(img[:,:,0]) | |
plt.show() | |
print('\n\n') | |
#show offloaded images for first 10 test samples | |
show_image_compression(x_test[:10]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment