Fix that number of layers parameter defaults to 1 instead of 2 in both python and c++ implementations
number of layers