question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'DPN' object has no attribute 'input_space' Cifar10 example

See original GitHub issue

When 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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
creafzcommented, Apr 7, 2018

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.

0reactions
morawicommented, May 18, 2018

Strangely, it is working now without problems.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found