Analyses of Learning Characteristics of RBMs and an Automatic Method for Deciding the Number of Hidden Units