[Enhancement] Check duplicate layers in the container (#2351)
[Enhancement] Check duplicate layers in the container (#2351)

* check duplicate layers in the container

* add more unit ttest

* fix unit test

* fix test

* meet code review

yangw1234/BigDL,yangw1234/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,yangw1234/BigDL,yangw1234/BigDL