I found this Keras implementation on Kaggle. I need to convert it to PyTorch. Can someone please help me? Also, please give an explanation if possible. I need this for my RGB dataset (3,100,100)
def build_base_network(input_shape):
seq = Sequential()

nb_filter = [16, 32, 16]
kernel_size = 3


#convolutional layer 1
seq.add(Convolution2D(nb_filter[0], kernel_size, kernel_size, input_shape=input_shape,border_mode='valid', dim_ordering='th'))
seq.add(Activation('relu'))
seq.add(MaxPooling2D(pool_size=(2, 2)))  
seq.add(Dropout(.25))

#convolutional layer 2
seq.add(Convolution2D(nb_filter[1], kernel_size, kernel_size, border_mode='valid', dim_ordering='th'))
seq.add(Activation('relu'))
seq.add(MaxPooling2D(pool_size=(2, 2), dim_ordering='th')) 
seq.add(Dropout(.25))

#convolutional layer 2
seq.add(Convolution2D(nb_filter[2], kernel_size, kernel_size, border_mode='valid', dim_ordering='th'))
seq.add(Activation('relu'))
seq.add(MaxPooling2D(pool_size=(2, 2), dim_ordering='th')) 
seq.add(Dropout(.25))

#flatten 
seq.add(Flatten())
seq.add(Dense(128, activation='relu'))
seq.add(Dropout(0.1))
seq.add(Dense(50, activation='relu'))
return seq