So I try to get pretrained model 
`ssd = model_zoo.get_model('ssd_512_mobilenet1.0_voc`, pretrained=True)`, 
>From the summary, SSD have:

>SSD(
  (features): FeatureExpander(
  <Symbol group [ssd5_mobilenet0_relu22_fwd, ssd5_mobilenet0_relu26_fwd, 
ssd5_expand_relu0, ssd5_expand_relu1, ssd5_expand_relu2, ssd5_expand_relu3]> : 
1 -> 6
  )
  (class_predictors): HybridSequential(
    (0): ConvPredictor(
      (predictor): Conv2D(512 -> 84, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (1): ConvPredictor(
      (predictor): Conv2D(1024 -> 126, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (2): ConvPredictor(
      (predictor): Conv2D(512 -> 126, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (3): ConvPredictor(
      (predictor): Conv2D(512 -> 126, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (4): ConvPredictor(
      (predictor): Conv2D(256 -> 84, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (5): ConvPredictor(
      (predictor): Conv2D(256 -> 84, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
  )
  (box_predictors): HybridSequential(
    (0): ConvPredictor(
      (predictor): Conv2D(512 -> 16, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (1): ConvPredictor(
      (predictor): Conv2D(1024 -> 24, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (2): ConvPredictor(
      (predictor): Conv2D(512 -> 24, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (3): ConvPredictor(
      (predictor): Conv2D(512 -> 24, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (4): ConvPredictor(
      (predictor): Conv2D(256 -> 16, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
    (5): ConvPredictor(
      (predictor): Conv2D(256 -> 16, kernel_size=(3, 3), stride=(1, 1), 
padding=(1, 1))
    )
  )
  (anchor_generators): HybridSequential(
    (0): SSDAnchorGenerator(
    )
    (1): SSDAnchorGenerator(
    )
    (2): SSDAnchorGenerator(
    )
    (3): SSDAnchorGenerator(
    )
    (4): SSDAnchorGenerator(
    )
    (5): SSDAnchorGenerator(
    )
  )
  (bbox_decoder): NormalizedBoxCenterDecoder(
  )
  (cls_decoder): MultiPerClassDecoder(
  )
)

I want to extract only the feature extractor of ssd (which is mobilenet).
>From ssd.features, it supposed to be the mobilenet layer, but why it does not 
>convey the mobilenet architecture? I compare from 
`model_zoo.get_model('mobilenet1.0', pretrained=True)`
which have:

> MobileNet(
  (features): HybridSequential(
    (0): Conv2D(3 -> 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), 
bias=False)
    (1): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=32)
    (2): Activation(relu)
    (3): Conv2D(1 -> 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=32, bias=False)
    (4): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=32)
    (5): Activation(relu)
    (6): Conv2D(32 -> 64, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (7): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=64)
    (8): Activation(relu)
    (9): Conv2D(1 -> 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), 
groups=64, bias=False)
    (10): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=64)
    (11): Activation(relu)
    (12): Conv2D(64 -> 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (13): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=128)
    (14): Activation(relu)
    (15): Conv2D(1 -> 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=128, bias=False)
    (16): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=128)
    (17): Activation(relu)
    (18): Conv2D(128 -> 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (19): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=128)
    (20): Activation(relu)
    (21): Conv2D(1 -> 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), 
groups=128, bias=False)
    (22): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=128)
    (23): Activation(relu)
    (24): Conv2D(128 -> 256, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (25): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=256)
    (26): Activation(relu)
    (27): Conv2D(1 -> 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=256, bias=False)
    (28): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=256)
    (29): Activation(relu)
    (30): Conv2D(256 -> 256, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (31): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=256)
    (32): Activation(relu)
    (33): Conv2D(1 -> 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), 
groups=256, bias=False)
    (34): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=256)
    (35): Activation(relu)
    (36): Conv2D(256 -> 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (37): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (38): Activation(relu)
    (39): Conv2D(1 -> 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=512, bias=False)
    (40): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (41): Activation(relu)
    (42): Conv2D(512 -> 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (43): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (44): Activation(relu)
    (45): Conv2D(1 -> 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=512, bias=False)
    (46): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (47): Activation(relu)
    (48): Conv2D(512 -> 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (49): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (50): Activation(relu)
    (51): Conv2D(1 -> 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=512, bias=False)
    (52): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (53): Activation(relu)
    (54): Conv2D(512 -> 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (55): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (56): Activation(relu)
    (57): Conv2D(1 -> 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=512, bias=False)
    (58): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (59): Activation(relu)
    (60): Conv2D(512 -> 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (61): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (62): Activation(relu)
    (63): Conv2D(1 -> 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=512, bias=False)
    (64): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (65): Activation(relu)
    (66): Conv2D(512 -> 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (67): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (68): Activation(relu)
    (69): Conv2D(1 -> 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), 
groups=512, bias=False)
    (70): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=512)
    (71): Activation(relu)
    (72): Conv2D(512 -> 1024, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (73): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=1024)
    (74): Activation(relu)
    (75): Conv2D(1 -> 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), 
groups=1024, bias=False)
    (76): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=1024)
    (77): Activation(relu)
    (78): Conv2D(1024 -> 1024, kernel_size=(1, 1), stride=(1, 1), bias=False)
    (79): BatchNorm(axis=1, eps=1e-05, momentum=0.9, fix_gamma=False, 
use_global_stats=False, in_channels=1024)
    (80): Activation(relu)
    (81): GlobalAvgPool2D(size=(1, 1), stride=(1, 1), padding=(0, 0), 
ceil_mode=True, global_pool=True, pool_type=avg, layout=NCHW)
    (82): Flatten
  )
  (output): Dense(1024 -> 1000, linear)
)

How to get the mobilenet layer from object detection model zoo ssd? Thank you.





---
[Visit 
Topic](https://discuss.mxnet.apache.org/t/access-feature-extractor-in-object-detection-model-zoo/6776/1)
 or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.mxnet.apache.org/email/unsubscribe/c50aa1f05041fc097bfd281ea7e69e17cc678cc46ecd5f26b762ad6f23813e7f).

Reply via email to