'DPN' object has no attribute 'input_space' Cifar10 example
See original GitHub issueWhen setting the pre_trained_model to False, running ‘dpns’ gave the error ‘DPN’ object has no attribute ‘input_space’ in Cifar10 example. Except Resntes, all models gave this error. Using the attribute input_size=(32, 32) in make_model resolved the issue. [32x32] is the cifar10 resolution for each band.
model = make_model(
args.model_name,
pretrained=True,
num_classes=len(classes),
dropout_p=args.dropout_p,
input_size=(32, 32)
)
However, this ‘input_size’ gave the error: ResNet’ object has no attribute ‘features’ for all the Resnets. Thus, an if statement may be used to make-the-model. NB. For VGG* and squeezenet*, we need to provide the input-size in any case, Exception: You must provide input_size, e.g. make_model(vgg11, num_classes=10, pretrained=True, input_size=(224, 224)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
AttributeError: 'CIFAR10' object has no attribute 'tgz_md5' #740
My ENV: Ubuntu 16.04.1 + Anaconda 4.3 (with Python 3.6) Just testing dcgan, and my command line is as simple as: python main.py...
Read more >Cifar10 explanation with pytorch - Kaggle
This module defines a set of composable, function-like objects that can be passed as an argument to a torchvision dataset such as datasets.CIFAR10(…) ......
Read more >I created a CIFAR10 dataset learning model using a CNN ...
I think that your labels are integers not one-hot vectors and its shape is (None, 1). Try: LOSS = 'sparse_categorical_crossentropy'.
Read more >CIFAR-10 and CIFAR-100 datasets
The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and...
Read more >Image classification using CNN (CIFAR10 dataset) - YouTube
In this video we will do small image classification using CIFAR10 dataset in tensorflow. We will use convolutional neural network for this ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The second exception should be fixed in e7dc01f. I have changed the function that calculates the number of input features for the classifier, now it should work correctly for all models.
Strangely, it is working now without problems.