microsoft / CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
https://docs.microsoft.com/cognitive-toolkit/
Other
17.5k stars 4.29k forks source link

using pretrained model of VGG16 #3393

Open chung1204 opened 6 years ago

chung1204 commented 6 years ago

I downloaded vgg16 model here. https://www.cntk.ai/Models/Caffe_Converted/VGG16_ImageNet_Caffe.model Then, I'm trying to use above model to the cntk/Examples/Image/Classification/VGG/Python/VGG16_ImageNet_Distributed.py But it did not work and the following error has occurred.

ValueError: Values for 1 required arguments 'Input('data', [#], [3 x 224 x 224])', that the requested output(s) 'Output('aggregateLoss', [], []), Output('Block4880_Output_0', [#], [1]), Output('aggregateEvalMetric', [], [])' depend on, have not been provided

Is there a way to solve this problem? does VGG16_ImageNet_Distributed.py considering the pretrained model ??

delzac commented 6 years ago

Seems like you didn't feed data into the model. Normally it goes something like this:

trainer.train_minibatch({model.arguments[0]: data, target_tensor: labels})

your data should be of shape (3, 224, 224)