Professional Documents
Culture Documents
Home
Intuitive understanding of 1D, 2D, and 3D Convolutions Ask Question
PUBLIC
in Convolutional Neural Networks
Stack Overflow
conv-neural-network convolution
Teams
Q&A for work 67
edited Oct 12 '18 at 2:13
Learn More kmario23
16k 4 58 69
1 Answer
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 1/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
import tensorflow as tf
import numpy as np
sess = tf.Session()
ones_1d = np.ones(5)
weight_1d = np.ones(3)
strides_1d = 1
in_width = int(in_1d.shape[0])
filter_width = int(filter_1d.shape[0])
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 2/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
ones_2d = np.ones((5,5))
weight_2d = np.ones((3,3))
strides_2d = [1, 1, 1, 1]
in_width = int(in_2d.shape[0])
in_height = int(in_2d.shape[1])
filter_width = int(filter_2d.shape[0])
filter_height = int(filter_2d.shape[1])
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 3/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
ones_3d = np.ones((5,5,5))
weight_3d = np.ones((3,3,3))
strides_3d = [1, 1, 1, 1, 1]
in_width = int(in_3d.shape[0])
in_height = int(in_3d.shape[1])
in_depth = int(in_3d.shape[2])
filter_width = int(filter_3d.shape[0])
filter_height = int(filter_3d.shape[1])
filter_depth = int(filter_3d.shape[2])
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 4/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
in_width = int(in_3d.shape[0])
in_height = int(in_3d.shape[1])
filter_width = int(filter_3d.shape[0])
filter_height = int(filter_3d.shape[1])
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
input_3d = tf.reshape(in_3d, [1, in_height, in_width
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 5/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
kernel_3d = tf.reshape(filter_3d, [filter_height, filt
in_width = int(in_3d.shape[0])
in_height = int(in_3d.shape[1])
filter_width = int(filter_4d.shape[0])
filter_height = int(filter_4d.shape[1])
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 6/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
in_width = int(in_3d.shape[0])
in_height = int(in_3d.shape[1])
filter_width = int(filter_4d.shape[0])
filter_height = int(filter_4d.shape[1])
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 7/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 8/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
Bonus C3D
in_width = int(in_4d.shape[0])
in_height = int(in_4d.shape[1])
in_depth = int(in_4d.shape[2])
filter_width = int(filter_5d.shape[0])
filter_height = int(filter_5d.shape[1])
filter_depth = int(filter_5d.shape[2])
sess.close()
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 9/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
Summary
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
5 Considering your labor and clarity in the explanations, upvotes
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 10/11
1/7/2019 machine learning - Intuitive understanding of 1D, 2D, and 3D Convolutions in Convolutional Neural Networks - Stack Overflow
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
https://stackoverflow.com/questions/42883547/intuitive-understanding-of-1d-2d-and-3d-convolutions-in-convolutional-neural-n 11/11