As a F-visa holder, you are considered as a nonresident from 2011-2015. Starting from January 1, 2016, you will be considered as a US resident for tax purposes if you meet the SPT. Changing to a H-1B visa does not contradict with the days you are present in the US and thus does not affect your 2017 filing. Therefore, you are still considered as a resident and file a Form 1040 for your 2017 taxes.