Support tf and header
fix type bug
Change default for double 1.0