[Tensor] Handle copy edge case
authorJihoon Lee <jhoon.it.lee@samsung.com>
Tue, 26 Jan 2021 10:16:38 +0000 (19:16 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Mon, 1 Feb 2021 07:52:18 +0000 (16:52 +0900)
commit9ac6998738d0f21197a16ce1583738c754eac57c
tree6fabd07f4ee0ae93a45ac2a766389002d89795e8
parent7ae149eff76f522b4b06df994728296b72696567
[Tensor] Handle copy edge case

When copying uninitialized tensor to another unintialized tensor,
tensor::copy tried to reshape uninitialized dimension.

This patch fixes the issue.

**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/tensor/tensor.cpp
test/unittest/unittest_nntrainer_layers.cpp