Do males ever produce the offspring?
Yes the males of a group of bony fish Syngnathidae can bear offsprings or as you say produce offsprings. This group includes Seahorses and Pipefishes. In some species the male have either a brood pouch attached to the trunk or its tail while in others the egg is attached to the trunk or tail laid by the female.The fertilisation takes place in the pouch or in water before implantation.

Here are some pictures :

1.Male seahorse with brood pouch and a slender female without a brood pouch


2.Male seahorse giving birth to a baby seahorse


3.Male Syngnathus sp.(pipe fish) with the brood pouch

Inset image C shows eggs in pouch of pregnant male and Inset E shows Embryos in the pouch of pregnant male. (Images taken from researchgate.net and peaubleue.org)

Now coming to your question 


  why are they considered male and not female?


Though the males here bear the baby but the baby results from fertilisation of a sperm produced by the male (the same seahorse that is destined to bear the baby) and an ovum produced by the female (the other seahorse without a brood pouch).
The sperm / male gamete producing individual is a male and a ovum/female gamete producing individual is a female. The provision of being able to bear a child does not change the sex.

Note: Seahorse is an oviviviparous organism i.e they are organisms in which the fertilised eggs develop inside the parent's body until they are ready to hatch.

P.S. Brood pouch is a cavity outside the body of these fishes in which the eggs develop and hatch.

Source: Wikipedia