shidong-ai / DNNMark

Benchmarks of Deep Neural Networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Input sizes for DNNMark

mattsinc opened this issue · comments

How can I increase (or decrease) the input sizes for a given test in DNNMark? For example, if I want to increase the input size for alexnet, fwd_softmax, or bwd_softmax, how do I go about doing that?

Matt

@mattsinc Matt,
In any configuration file in config_example, you can find something like
n=16
c=3
h=227
w=227
This is the dimension information of the input data, you can change the number to increase or decrease input size.
So far there is no way to configure multiple sizes in one experiment. You have to change the configuration file every time if you want to have different input size in different experiments.

Shi

Thanks @doody1986. Are there any guidelines about how to change those values though? I thought they are set in a specific proportion?

Matt

@mattsinc
I set those numbers based on a real model, Alexnet. Technically, they can be set to any number you want. But usually, only changing n (batch size) is more reasonable as this is the only parameter that can be changed in a real model.

Shi

@doody1986, so you are using a batch size of 16, thanks. What is the implication though of the larger batch size -- it will increase the number of nodes in the input layer, and thus increase memory traffic, ALU computations, etc.?

@mattsinc If you are talking about the fully-connected layer, changing the batch size should not change the number of nodes, but changing other dimensions such as C, H, W will.
And increasing batch size indeed create more memory traffic and computations by introducing larger input matrices for each layer.

Got it, thanks!

Actually, @doody1986, a related question: is this change the same for all benchmarks? Or just alexnet?

Matt

@mattsinc It is the same for all benchmarks in changing the input size. But the execution implications in different layers could be different.

Shi

Got it, thanks!

Matt