OK. I do stand corrected. And further investigation showed we ( the USA ) did also have the Mk 27 Torpedo with was too slow to be used as an attack weapon and was used as a purely defensive weapon. The primary torpedo we used was the Mk14 even as crappy as it was it was still in use when I served on the boats.
It still is not feasible to shoot a torpedo while under an enemy ship nor is it a good idea to position yourself under an enemy ship in a submarine period. You ever drive a submarine? It would be a very tricky move as you cannot see the other ship the chance for a collision is very high when that close. What you suggest would be nearly suicidal.
Yea, the more I think about it in WW2 they developed the "hedgehog" and other forward-throwing/launching systems so the ship's Sonar wouldn't lose contact (as would happen when a 500lb WW2 depth-charge exploded) so the upwards-firing torpedo would miss and again give away exact location. Actually fairly interesting is some of the systems we came up with, one fired 6 4oolb depth charges in a triangle pattern rigged to detonate 30 ft different depths, the result was a hull-crushing pressure wave. Sucked to be on a U-boat in WW2, 75% never returned and this was a pressure hull that could take 900ft if needed, pretty solid for a WW2 design.