stanford-futuredata / noscope

Accelerating network inference over video
http://dawn.cs.stanford.edu/2017/06/22/noscope/
436 stars 122 forks source link

code problem:noscope/Models.py->try_params->nb_classes = params[1]? #18

Open Megatron2032 opened 7 years ago

Megatron2032 commented 7 years ago

First,Thank you for contributing the code.When i read the Models.py,i have a problem that i can't understand. in noscope/Models.py,the function of try_params(...),in line 305 nb_classes means the number of the classes,but params[1] is member of list(itertools.product( *[[X_train.shape[1:]], [nb_classes],[32, 64, 128, 256], [32], [0, 1, 2]])), so params[1]=[(50,50,3),2,32,32,1] why nb_classes = params[1]?I think nb_classes=params[1][2],because params[1][2] is [nb_classes]. am I wrong?if i am wrong,please help me understand it,thank you!

ddkang commented 7 years ago

Thank you for pointing this out. As it turns out, this is a bug. However, the behavior is actually correct, the binary classification task should have 2 outputs. We will need to update this and also change the behavior for nb_classes=1.