'Read the given SGF file into an iterable of (input,output) pairs
for neural network training
Each input is a GameState converted into one-hot neural net features
Each output is an action as an (x,y) pair (passes are skipped)
If this game\'s size does not match bd_size, a SizeMismatchError is raised'

def convert_game(self, file_name, bd_size):

    with open(file_name, 'r') as file_object:
        state_action_iterator = sgf_iter_states(file_object.read(), include_end=False)
    for (state, move, player) in state_action_iterator:
        if (state.size != bd_size):
            raise SizeMismatchError()
        if (move != go.PASS_MOVE):
            nn_input = self.feature_processor.state_to_tensor(state)
            (yield (nn_input, move))
