Every prisoner charged with or convicted of a felony who is an inmate of any public training school or reformatory or county hospital who escapes or attempts to escape from such public training school or reformatory or county hospital is guilty of a felony and is punishable by imprisonment in the state prison, or by a fine not exceeding ten thousand dollars ($10,000), or by both such fine and imprisonment.