xiaolai-sqlai / gluon-reid

A code gallery for person re-identification with mxnet-gluon, and I will reproduce many STOA algorithm.
176 stars 28 forks source link

Parameter 'resnet0_dense0_weight' has not been initialized yet because initialization was deferred. #6

Closed mmchen88 closed 5 years ago

mmchen88 commented 5 years ago

The program broke when it goes to "trainer.step(batch_size)",and the console prints: mxnet.gluon.parameter.DeferredInitializationError: Parameter 'resnet0_dense0_weight' has not been initialized yet because initialization was deferred. Actual initialization happens during the first forward pass. Please pass one batch of data through the network before accessing Parameters. You can also avoid deferred initialization by specifying in_units, num_features, etc., for network layers.


How to fix it,please?

mmchen88 commented 5 years ago

It is my fault. I changed the "pretrained" parameter to "False". it should be "True"