Skip to content

Commit c174170

Browse files
committed
[VISUALIZE] bug, frame support (row,col,1)-->(row,col)
1 parent 6773d5a commit c174170

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tensorlayer/visualize.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ def frame(I=None, second=5, saveable=True, name='frame', cmap=None, fig_idx=1283
9898
plt.ion()
9999
fig = plt.figure(fig_idx) # show all feature images
100100

101+
if len(I.shape) and I.shape[-1]==1: # (10,10,1) --> (10,10)
102+
I = I[:,:,0]
103+
101104
plt.imshow(I, cmap)
102105
plt.title(name)
103106
# plt.gca().xaxis.set_major_locator(plt.NullLocator()) # distable tick

0 commit comments

Comments
 (0)