MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / VGG

Class VGG

tensorlayer/models/vgg.py:91–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91class VGG(Model):
92
93 def __init__(self, layer_type, batch_norm=False, end_with='outputs', name=None):
94 super(VGG, self).__init__(name=name)
95 self.end_with = end_with
96
97 config = cfg[mapped_cfg[layer_type]]
98 self.layers = make_layers(config, batch_norm, end_with)
99
100 def forward(self, inputs):
101 """
102 inputs : tensor
103 Shape [None, 224, 224, 3], value range [0, 1].
104 """
105
106 inputs = inputs * 255 - np.array([123.68, 116.779, 103.939], dtype=np.float32).reshape([1, 1, 1, 3])
107
108 out = self.layers.forward(inputs)
109 return out
110
111
112def make_layers(config, batch_norm=False, end_with='outputs'):

Callers 2

vgg16Function · 0.85
vgg19Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected