I can’t benchmark your workload in detail, but TensorFlow should have good official coverage from Apple running TensorFlow on Apple Silicon / Metal.
Also I would trade up in a heartbeat from the machines you list. Here is a MacBook Air handing it to two Intel “workstations” in a benchmark. (3x to 4x speedup)
I love Apple refurbished - it saves me the cost of AppleCare typically and the quality has been stellar in my years of seeing them ordered.
In your case, the 2018 model (as will most Intel based Macs except the iMac Pro and Mac Pro) will likely decline in value pretty quickly now and the M1 will likely hold resale value for much longer. You might even trade it in with Apple for an easy $ if you don’t want to reuse or resell it yourself.
The code for triald
and CoreML is still being written and will be much slower on the Intel CPU vs Apple Silicon
You will also get battery life benefits and other features as part of the upgrade. Unless your libraries and models are very Intel specific, you’ll want to be where Apple is investing all of its engineering which is the iOS / iPadOS and macOS SDK for Apple Silicon.
Due to drivers and GPU you’ll want an iMac Pro or Mac Pro and likely do heavy lifting in Windows for CUDA work. Converting to CoreML should be fine as is using either MacBook Pro or any M1 (even the air) to refine the models or if you’re not doing this professionally and can not fund a Xeon class workstation ($4k and up US).
You can have a super snappy Mac with all your features you love for a discount. I think you should jump on the M1.