Yankees starting pitcher Carlos Rodon walks to the dugout after...

Yankees starting pitcher Carlos Rodon walks to the dugout after being taken out of the game during the sixth inning against the San Francisco Giants in an MLB game at Yankee Stadium on Sunday. Credit: Kathleen Malone-Van Dyke

After his previous outing, Carlos Rodon lamented the walks.

“Definitely tired of walking people,” the Yankees lefthander said after walking three last Monday in Detroit, with two of those free passes preceding a three-run homer by Andy Ibanez that turned the game around.

Rodon is still tired of it.

Walking three more batters — one of those coming just before a go-ahead three-run homer — Rodon mostly threw the ball well but not good enough in a 5-4 loss to the Giants at the Stadium on Sunday afternoon.

“Just frustrating once again,” Rodon said. “Falling behind guys . . . It’s really frustrating. Up 3-1 in the sixth there, obviously want to hang up a zero. Just a mixed execution on a curveball. It’s not good enough.”

Rodon (1-3, 5.48) allowed four runs and three hits  in 5 2/3 innings, striking out eight. He took a two-run lead into the sixth, but with one out and a runner on first, he walked Willy Adames. He got ahead of Jung Hoo Lee 0-and-2, but three pitches later, Lee — who had homered in the fourth — hit a hanging curveball over the right-centerfield wall for a three-run homer that put the Giants ahead 4-3. 

“Terrible execution,” Rodon said of the up-and-in curveball to Lee, who went 4-for-9 with his first  three homers of the season, a double, four walks and seven RBIs in the three-game series. 

Manager Aaron Boone felt Rodon threw the ball well — “excellent,” he said afterward — something he’s said for the most part after each of Rodon's outings this year.

“A critical mistake with runners on,” Boone said. “It’s really one pitch that hurt his outing, with two strikes, a hanging curveball . . . You have to try to avoid those.”

Casey Schmitt led off the seventh with a double and scored on an error by Paul Goldschmidt to give the Giants a 5-3 lead.

The Yankees' offense did not distinguish itself, going cold after giving Rodon the early lead. After Ben Rice’s two-out  RBI single to leftfield in the second made it 3-0, the Yankees did not get another hit until Jazz Chisholm Jr. homered in the eighth to bring the Yankees within  5-4.

Righthander Ryan Walker retired the Yankees (8-7) in order in the ninth for the save, allowing the Giants (11-4) to take two of three in the series.

Before Sunday’s game, with had a first-pitch temperature  of 54, Boone said to his players the weather would feel like “Maui.”

“That’s probably the coldest I’ve ever played in this past week,” said Chisholm, who was in a 2-for-35 slide before hitting his home run. “But at the end of the day, this is my job and this is what I get paid to do. In my contract it doesn’t say I don’t play [when] it’s less than 40 degrees.”

The Yankees started quickly against righty Logan Webb, whom Boone before the game called “one of the best pitchers in the National League.”

With one out in the first, Aaron Judge lasered a sinker 417 feet off the wall in center for a double. Cody Bellinger’s groundout to Webb moved Judge to third and Goldschmidt, swinging at a first-pitch changeup, dumped an RBI single to right for a 1-0 lead.

Jasson Dominguez, who snapped a 0-for-15 slide Saturday, doubled into the gap in left-center with one out in the second and J.C. Escarra rifled a changeup into the rightfield corner for an RBI double — his first major-league RBI — to make it 2-0. Escarra went to third on Oswaldo Cabrera’s groundout to second and scored on Rice's broken-bat single to left for a 3-0 lead.

The Giants’ first hit came with one out in the fourth when Lee teed off on a full-count slider and blasted it 406 feet to right-center.

 Rodon, who allowed 31 homers in 175 innings in 32 starts last season, has given up five in 23 innings this season.

“I think he’s made a lot of big pitches [but] his stuff is prone to the long ball, especially in certain situations,” Boone said. “Preventing that as best we can is the challenge.”

Not much more on Stroman. Boone said Marcus Stroman, put on the injured list over the weekend with left knee inflammation, received a cortisone injection in the knee on Saturday. He did not have a timetable for the righthander’s return. “Hoping it’s not long,” Boone said. “The MRI was good, but he had some swelling in there somewhere. Trying to eliminate that.”