[test] add test case when a specific layer is non-trainable