Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

A couple of issues in benchmark_score.py #8969

Closed
juliensimon opened this issue Dec 6, 2017 · 5 comments
Closed

A couple of issues in benchmark_score.py #8969

juliensimon opened this issue Dec 6, 2017 · 5 comments
Labels

Comments

@juliensimon
Copy link

Here are a couple of issues in incubator-mxnet/example/image-classification/benchmark_score.py.

Both prevent the script from running.

--> Issue #1
def get_symbol(network, batch_size):
image_shape = (3,299,299) if network == 'inception-v3' else (3,224,224)
num_layers = 0

get_symbol() for vgg16 doesn't accept a zero value for the number of layers.
Quick fix: insert this after "num_layers = 0"
if network=='vgg':
num_layers=16
Or use the same solution as for resnet (split and extract number of layers)

--> Issue #2
devs = [mx.gpu(0)] if len(get_gpus()) > 0 else []

get_gpus() relies on nvidia-smi which is not installed on machines that don't have GPUs (say, c4 instances on AWS).

@goswamig
Copy link
Contributor

Please add labels: "Example", "Need Triage"

@mbaijal
Copy link
Contributor

mbaijal commented Mar 20, 2018

Please remove the label 'Need Triage'

@szha szha removed the needs triage label Mar 24, 2018
@szha
Copy link
Member

szha commented Mar 24, 2018

@gautamkmr @sandeep-krishnamurthy please refrain from manually adding "Need Triage" label while triaging. Thanks.

@thomelane
Copy link
Contributor

@juliensimon just tested this out and I don't hit either of these issues.

With regards to Issue 1, there is logic to extract the number of layers from the network string for VGG (as with ResNet).

if 'vgg' in network:
    num_layers = int(network.split('-')[1])

And for Issue 2, I tried get_gpus() on a CPU machine and due to the except OSError exception handling the function just returns an empty list which is expected behaviour of this function. In benchmark_score.py the cpu context is added.

So I think something must have been fixed since you filed this issue. But please do reopen if you're still hitting these issues.

@thomelane
Copy link
Contributor

@indhub @yzhliu would appreciate if you could close this issue, many thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants