The Technic Museum Speyer in Germany has four submarines on display - the postwar U9 built in 1966, along with three WW2 midgets - a Seehund, a Biber and a Marder - as well as numerous warship models. Of course, if you are into aircraft they have a pretty impressive collection of those as well - including a 747, a Concorde, a Tu-144, the Burat (Soviet space shuttle), an An-22, and a lot more.
Note that a lot of guides/websites seem to provide ambiguous information which doesn’t clearly distinguish this museum from the nearby Technic Museum Sinsheim – which has a similar U-boat (U-17) on display.