application_nasnet: Instantiates a NASNet model.

Description Usage Arguments

View source: R/applications.R

Description

Note that only TensorFlow is supported for now, therefore it only works with the data format image_data_format='channels_last' in your Keras config at ~/.keras/keras.json.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
application_nasnet(
  input_shape = NULL,
  penultimate_filters = 4032L,
  num_blocks = 6L,
  stem_block_filters = 96L,
  skip_reduction = TRUE,
  filter_multiplier = 2L,
  include_top = TRUE,
  weights = NULL,
  input_tensor = NULL,
  pooling = NULL,
  classes = 1000,
  default_size = NULL
)

application_nasnetlarge(
  input_shape = NULL,
  include_top = TRUE,
  weights = NULL,
  input_tensor = NULL,
  pooling = NULL,
  classes = 1000
)

application_nasnetmobile(
  input_shape = NULL,
  include_top = TRUE,
  weights = NULL,
  input_tensor = NULL,
  pooling = NULL,
  classes = 1000
)

nasnet_preprocess_input(x)

Arguments

input_shape

Optional shape list, the input shape is by default (331, 331, 3) for NASNetLarge and (224, 224, 3) for NASNetMobile It should have exactly 3 inputs channels, and width and height should be no smaller than 32. E.g. (224, 224, 3) would be one valid value.

penultimate_filters

Number of filters in the penultimate layer. NASNet models use the notation NASNet (N @ P), where: - N is the number of blocks - P is the number of penultimate filters

num_blocks

Number of repeated blocks of the NASNet model. NASNet models use the notation NASNet (N @ P), where: - N is the number of blocks - P is the number of penultimate filters

stem_block_filters

Number of filters in the initial stem block

skip_reduction

Whether to skip the reduction step at the tail end of the network. Set to FALSE for CIFAR models.

filter_multiplier

Controls the width of the network.

  • If filter_multiplier < 1.0, proportionally decreases the number of filters in each layer.

  • If filter_multiplier > 1.0, proportionally increases the number of filters in each layer. - If filter_multiplier = 1, default number of filters from the paper are used at each layer.

include_top

Whether to include the fully-connected layer at the top of the network.

weights

NULL (random initialization) or imagenet (ImageNet weights)

input_tensor

Optional Keras tensor (i.e. output of layer_input()) to use as image input for the model.

pooling

Optional pooling mode for feature extraction when include_top is FALSE. - NULL means that the output of the model will be the 4D tensor output of the last convolutional layer. - avg means that global average pooling will be applied to the output of the last convolutional layer, and thus the output of the model will be a 2D tensor. - max means that global max pooling will be applied.

classes

Optional number of classes to classify images into, only to be specified if include_top is TRUE, and if no weights argument is specified.

default_size

Specifies the default image size of the model

x

a 4D array consists of RGB values within [0, 255].


dfalbel/keras documentation built on Nov. 27, 2019, 8:16 p.m.