if you train yourself by looking at GPL code then go implement your own things, is that code GPL?

I work with people who literally won't even look at GPL code, because of the risk. So yes, potentially.

it can be, depending on if it is different enough to convince a jury that it is not a copyright violation. See the lawsuits from Marvin Gaye's family to see how that can be unpredictable.

Of course not, because everyone making these arguments wants people to have some magic sauce so they get to ignore all the rules placed on the "artificial" thing.

If you genuinely believe that you are not above a literal text completion algorithm and do not deserve any more rights than it, that says more about you than anything else.

If you copy and paste one line from a thousand different GPL projects, is the resulting program GPL?

Let's be honest about what's happening here.

It could be. The amount of code you copy doesn't matter, just depends on context and if your work could now be considered derivative.

I said this else where, but I work with people who won't even look at GPL code because of the potential legal entanglements.

Yes let's. Corporations with billions of dollars behind them whole sale stole copy right work and licenced code to train models, and then turned around and sold the result with no attribution or monetary benefit given to the people they stole from. They knew what they were doing and relied on the legal system being slow enough that they could plant a flag in the market before legal challenges killed them.

It's an industry built on theft. By all rights they should have been sued/fined out of existence before it ever got this far. But if you have enough money you can make almost anything legal.