U.S. President Barack Obama delivers a statement on the economy at the press briefing room at the White House in Washington Thomson Reuters President Barack Obama said in a commencement speech on Saturday that US race relations have improved over the last three decades, but that significant work still needs to be done.

"I tell you this not to lull you into complacency, but to stir you into action because there's still so much work to do," Obama told about 2,300 Howard University graduates in Washington.

The United States has a racial gap in economic opportunities, Obama said, noting that the overall US employment rate is about 5 percent but it is near 9 percent for African-Americans.

Obama, the son of a white mother and African father, told the graduates to embrace their racial identity.

"Be confident in your blackness," Obama said, adding "there is no one way to be black ... There's no straightjacket, there's no litmus test for authenticity."

He added that "my election did not create a post-racial society."

Obama also urged the crowd not to try to prod colleges and universities into disinviting controversial speakers - something that has taken place regularly at campuses throughout the United States.

Howard University is one of about 100 historically black colleges and universities in the United States.

Obama argued that the United States and the world has progressed dramatically since 1983 when he graduated from college. He said today's college graduates are better positioned than any other to address big outstanding problems.

"America is by almost every measure better than it was" in 1983, Obama said, noting that US poverty rate is down, the number of people with college degrees is up and the number of women in the workforce have risen.

President Barack Obama pauses as he speaks at the El Reno Federal Correctional Institution in El Reno, Okla., Thursday, July 16, 2015. AP

But Obama noted an area that has not improved in recent decades - the US prison population - currently at 2.2 million, it is up from 500,000 in 1983.

African-American men are six times more likely than white men to be incarcerated, Obama said, and urged the graduates to lobby the US Congress to pass a pending criminal justice reform measure.