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

[cpp-package] inception_bn.cpp is wrong #9417

Closed
takuya-takeuchi opened this issue Jan 14, 2018 · 3 comments · Fixed by #13284
Closed

[cpp-package] inception_bn.cpp is wrong #9417

takuya-takeuchi opened this issue Jan 14, 2018 · 3 comments · Fixed by #13284
Labels
Bug C++ Related to C++ Example

Comments

@takuya-takeuchi
Copy link

Description

Sample code is wrong. In InceptionFactoryB function, pooling variable is created by passing wrong arguments.

Environment info (Required)

Windows 7/10

Build info (Required if built from source)

Compiler (gcc/clang/mingw/visual studio): Visual Studio 2015

MXNet commit hash: #c3d6cf09007dc11e1a5e2227075422911aa2eb3e

Error Message:

Check failed: -1 == 0 Error in operator ch_concat_3c_chconcat: [14:08:24] d:\works\opensource\mxnetdotnet\incubator-mxnet\src\operator\./concat-inl.h:186: Check failed: shape_assign(&(*in_shape)[i], dshape) Incompatible input shape: expected [40,0,14,14], got [40,320,13,13]
Check failed: -1 == 0 Error in operator ch_concat_3c_chconcat: [14:08:24] d:\works\opensource\mxnetdotnet\incubator-mxnet\src\operator\./concat-inl.h:186: Check failed: shape_assign(&(*in_shape)[i], dshape) Incompatible input shape: expected [40,0,14,14], got [40,320,13,13]
Check failed: -1 == 0 [14:08:24] D:\Works\OpenSource\MXNetDotNet\incubator-mxnet\src\executor\graph_executor.cc:558: Check failed: arg_top < in_args.size() (0 vs. 0)

What have you tried to solve it?

  1. Change code
  Symbol pooling = Pooling("max_pool_" + name + "_pool", data,
                           Shape(3, 3), PoolingPoolType::kMax,
                           false, false, PoolingPoolingConvention::kValid, Shape(2, 2));

to

  Symbol pooling = Pooling("max_pool_" + name + "_pool", data,
                           Shape(3, 3), PoolingPoolType::kMax,
                           false, false, PoolingPoolingConvention::kValid, Shape(2, 2), Shape(1, 1));
  1. Op.h provides default value for pad param as Shape(1, 1)
@anirudh2290
Copy link
Member

@marcoabreu

@leleamol
Copy link
Contributor

leleamol commented Nov 1, 2018

Hi @takuya-takeuchi ,
Will you be able to share the use-cases that you are planning to address using C++ API?
Are you planning to use C++ API for training workflows?

@takuya-takeuchi
Copy link
Author

I will not use mxnet cpp api for training for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug C++ Related to C++ Example
Projects
None yet
4 participants