zhanghang1989 / ResNet-Matconvnet

Train Deep Residual Network from Scratch or or Fine-tune Pre-trained Model using Matconvnet
http://zhanghang1989.github.io/ResNet/
MIT License
82 stars 44 forks source link

Undefined function or variable 'bn'. #1

Closed wajihullahbaig closed 8 years ago

wajihullahbaig commented 8 years ago

I get the "Undefined function or variable 'bn'." error when I run the command

run_cifar_experiments([20 32 44 56 110], 'plain', 'gpus', [1]);

info = add_group(opts.networkType, net, n, info, 3, 16, 1, opts);
Undefined function or variable 'bn'.

Error in res_cifar_init>add_group (line 87)
  add_block_conv(net, sprintf('%d', info.lastIdx+1), lName, ...

Error in res_cifar_init (line 50)
info = add_group(opts.networkType, net, n, info, 3, 16, 1, opts);

Error in res_cifar (line 42)
    net = res_cifar_init(m, 'networkType', opts.modelType, ...

Error in run_cifar_experiments (line 30)
  [net,info] = res_cifar(Ns(i), 'modelType', MTs{i}, opts);

>> run_cifar_experiments([20 32 44 56 110], 'plain', 'gpus', [1]);
zhanghang1989 commented 8 years ago

Hi, Thank you very much for pointing out this bug! It is fixed in the commit #8e3a4ab

It was my bad. When I was updating the 'resnet', I forgot to make related changes for 'plain' net. And obviously, the people who have used my code, only care about 'resnet' :) It is good to know this bug. Please let me know how it goes on your machine.

Best, Hang

wajihullahbaig commented 8 years ago

Thanks for the reply. I will be testing your code again in a day or two :).