[Fix] Setting batch after finalize/initialize
authorJihoon Lee <jhoon.it.lee@samsung.com>
Tue, 30 Nov 2021 03:54:18 +0000 (12:54 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Fri, 3 Dec 2021 11:38:55 +0000 (20:38 +0900)
commit2771d3c2e3276eb7babf91f4eff4f81a3b08661e
tree0ed66b5bd3d604fdd40ae201aea3c74ec1183faa
parentfecd13a8976bb2967e7a643fcb793177bd956c2f
[Fix] Setting batch after finalize/initialize

This patch delays setting batch after finalize/initialize.

Setting batch must be done after runcontext has made, the reason is that
we have semantics that finalize should be independent of batch size, but
if batch size is set before output_dims batch must be set according to
input_dims batch, which is not desirable.

**V2**
Fix hidden bugs related to this

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
nntrainer/graph/network_graph.cpp
nntrainer/layers/bn_layer.cpp
nntrainer/layers/grucell.cpp
nntrainer/layers/layer_node.cpp
nntrainer/layers/lstmcell.cpp
nntrainer/layers/rnncell.cpp
nntrainer/models/neuralnet.cpp