add half precision support, fix unittest for convnet