资源算法densenet_1d

densenet_1d

2020-03-30 | |  66 |   0 |   0

densenet_1d

This repository contains a Keras implementation of the DenseNet paper (Huang et al, "Densely Connected Convolutional Networks", CVPR 2017). This implementation will focus on use-cases where the inputs are 1D sequences.

Setup

To install densenet, simply clone this repository, and run

python setup.py install

Usage

The classifiers directory contains classifiers implemented as subclasses of keras.models.Model classes. This means that once a densenet.classifier is instantiated, it contains all of the usual methods of keras.models.Model, such as fitpredictevaluatesummary, etc.

Here is an instantiation of the model that matches the original Huang et al. paper, except using a one-dimensional input rather than a two-dimensional input:

from densenet.classifiers.one_d import DenseNet121
model = DenseNet121(input_shape=(224, 13))print(model.summary())

Upon running those lines, you should see an extensive summary indicating the layers in the model.

Note that the DenseNet implementations are highly customizable. For example, say you want to replace the default width-3 convolutions with width-5 ones. Simply instantiate your model as

from densenet.classifiers.one_d import DenseNet121
model = DenseNet121(input_shape=(224, 13), conv_kernel_width=5)print(model.summary())

References


上一篇:DenseNet-human-pose-estimation

下一篇:caffe-project-VggNet-ResNet-DenseNet

用户评价
全部评价

热门资源

  • DuReader_QANet_BiDAF

    Machine Reading Comprehension on DuReader Usin...

  • ETD_cataloguing_a...

    ETD catalouging project using allennlp

  • allennlp_extras

    allennlp_extras Some utilities build on top of...

  • allennlp-dureader

    An Apache 2.0 NLP research library, built on Py...

  • honk-honk-motherf...

    honk-honk-motherfucker