MCPcopy Create free account
hub / github.com/pytorch/pytorch / create_shufflenet

Function create_shufflenet

caffe2/python/models/shufflenet.py:176–198  ·  view source on GitHub ↗
(
    model,
    data,
    num_input_channels,
    num_labels,
    label=None,
    is_test=False,
    no_loss=False,
)

Source from the content-addressed store, hash-verified

174
175
176def create_shufflenet(
177 model,
178 data,
179 num_input_channels,
180 num_labels,
181 label=None,
182 is_test=False,
183 no_loss=False,
184):
185 builder = ShuffleNetV2Builder(model, data, num_input_channels,
186 num_labels,
187 is_test=is_test)
188 builder.create()
189
190 if no_loss:
191 return builder.last_out
192
193 if (label is not None):
194 (softmax, loss) = model.SoftmaxWithLoss(
195 [builder.last_out, label],
196 ["softmax", "loss"],
197 )
198 return (softmax, loss)

Callers

nothing calls this directly

Calls 2

createMethod · 0.95
ShuffleNetV2BuilderClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…