Skip to content

Instantly share code, notes, and snippets.

View karthikziffer's full-sized avatar
🎯
Focusing

Karthik karthikziffer

🎯
Focusing
View GitHub Profile
@karthikziffer
karthikziffer / viz.py
Last active November 14, 2019 11:31
Visualize images from loop using matplotlib subplot
import matplotlib.pyplot as plt
fig = plt.figure(figsize= (10, 10))
for i in range (0,12):
# required nrows=4, required ncoms=4, index_location= i+1
ax = fig.add_subplot(4, 4, i+1)
# x_batch[i]: Image object at each iteration
ax.imshow(x_batch[i])