Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,6 +32,7 @@ if st.button("Train"):
|
|
| 32 |
cmap="gray"
|
| 33 |
)
|
| 34 |
axs[i].axis("off")
|
|
|
|
| 35 |
with col2:
|
| 36 |
st.write("Conv2D Layer")
|
| 37 |
sub = Model(inputs=model.inputs[0],outputs=model.layers[0].output)
|
|
@@ -39,9 +40,12 @@ if st.button("Train"):
|
|
| 39 |
for i in range(6):
|
| 40 |
ax[i].imshow(sub.predict(x_train[0:1,:].reshape(1,28,28,1))[0,:,:,i],cmap="gray")
|
| 41 |
ax[i].axis("off")
|
|
|
|
| 42 |
with col3:
|
| 43 |
st.write("Average Pooling Layer")
|
| 44 |
max1 = Model(inputs=model.inputs[0],outputs=model.layers[1].output)
|
| 45 |
fig,ax1 = plt.subplots(6,1,figsize=(8,6))
|
| 46 |
for i in range(6):
|
| 47 |
ax1[i].imshow(max1.predict(x_train[0:1,:].reshape(1,28,28,1))[0,:,:,i],cmap="gray")
|
|
|
|
|
|
|
|
|
| 32 |
cmap="gray"
|
| 33 |
)
|
| 34 |
axs[i].axis("off")
|
| 35 |
+
st.pyplot(fig)
|
| 36 |
with col2:
|
| 37 |
st.write("Conv2D Layer")
|
| 38 |
sub = Model(inputs=model.inputs[0],outputs=model.layers[0].output)
|
|
|
|
| 40 |
for i in range(6):
|
| 41 |
ax[i].imshow(sub.predict(x_train[0:1,:].reshape(1,28,28,1))[0,:,:,i],cmap="gray")
|
| 42 |
ax[i].axis("off")
|
| 43 |
+
st.pyplot(fig)
|
| 44 |
with col3:
|
| 45 |
st.write("Average Pooling Layer")
|
| 46 |
max1 = Model(inputs=model.inputs[0],outputs=model.layers[1].output)
|
| 47 |
fig,ax1 = plt.subplots(6,1,figsize=(8,6))
|
| 48 |
for i in range(6):
|
| 49 |
ax1[i].imshow(max1.predict(x_train[0:1,:].reshape(1,28,28,1))[0,:,:,i],cmap="gray")
|
| 50 |
+
ax1[i].axis("off")
|
| 51 |
+
st.pyplot(fig)
|