资源算法ResNeXt-Tensorflow

ResNeXt-Tensorflow

2020-02-24 | |  45 |   0 |   0

ResNeXt-Tensorflow

Tensorflow implementation of ResNeXt using Cifar10

If you want to see the original author's code, please refer to this link

Requirements

  • Tensorflow 1.x

  • Python 3.x

  • tflearn (If you are easy to use global average pooling, you should install tflearn)

Issue

  • If not enough GPU memory, Please edit the code

with tf.Session() as sess : NOwith tf.Session(config=tf.ConfigProto(allow_soft_placement=True)) as sess : OK

Compare Architecture

ResNet

图片.png

ResNeXt

  • I implemented (b)

  • (b) is split + transform(bottleneck) + concatenate + transition + merge

Idea

What is the "split" ?

  def split_layer(self, input_x, stride, layer_name):      with tf.name_scope(layer_name) :
          layers_split = list()          for i in range(cardinality) :
              splits = self.transform_layer(input_x, stride=stride, scope=layer_name + '_splitN_' + str(i))
              layers_split.append(splits)          return Concatenation(layers_split)
  • Cardinality means how many times you want to split.

What is the "transform" ?

  def transform_layer(self, x, stride, scope):      with tf.name_scope(scope) :
          x = conv_layer(x, filter=depth, kernel=[1,1], stride=stride, layer_name=scope+'_conv1')
          x = Batch_Normalization(x, training=self.training, scope=scope+'_batch1')
          x = Relu(x)

          x = conv_layer(x, filter=depth, kernel=[3,3], stride=1, layer_name=scope+'_conv2')
          x = Batch_Normalization(x, training=self.training, scope=scope+'_batch2')
          x = Relu(x)          return x

What is the "transition" ?

  def transition_layer(self, x, out_dim, scope):      with tf.name_scope(scope):
          x = conv_layer(x, filter=out_dim, kernel=[1,1], stride=1, layer_name=scope+'_conv1')
          x = Batch_Normalization(x, training=self.training, scope=scope+'_batch1')          return x

Comapre Results (ResNet, DenseNet, ResNeXt)

compare

Related works

References

Author

Junho Kim


上一篇:experiment-on-DrQA

下一篇:Keras-ResNeXt

用户评价
全部评价

热门资源

  • TensorFlow-Course

    This repository aims to provide simple and read...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • mxnet_VanillaCNN

    This is a mxnet implementation of the Vanilla C...

  • DuReader_QANet_BiDAF

    Machine Reading Comprehension on DuReader Usin...

  • Klukshu-Sockeye-...

    KLUKSHU SOCKEYE PROJECTS 2016 This repositor...