Added error for classes that don't have an init function (#21880)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/21761
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21880
Differential Revision: D15879205
Pulled By: Chillee
fbshipit-source-id: 8b614970196b381357b6032a73eeaab0b7a4f667