As a representative deep learning model, convolutional neural networks (CNNs) have accomplished great achievements in image classification and object detection. However, CNNs require the resizing of the input images to a fixed size, which may affect the representations of objects. To overcome this limitation, we replace the last pooling layer with a topic model and call it a topic network. For arbitrary sizes and ratios of input images, the outputs of the topic network are fixed-size features due to the topic model of the topic layer, and they can reflect the global or regional characteristics of images by means of different scales. Two topic models, namely latent Dirichlet allocation (LDA) and Markov topic random fields (MTRF), are applied to the topic layer, and we call them latent Dirichlet allocation topic network and Markov topic random fields topic network, respectively. Both of them perform well in image classification with original size. More importantly, as a framework, any topic model can be easily applied to the topic layer of a topic network, which makes it much more flexible and extensible.