Targeted ketogenic dieting involves incorporating carbohydrates around a training session (before, during, and/or after). By doing so, the adrenaline from the training session blunts the insulin response you would get from the carbohydrates (thereby preventing the negative, anti-ketogenic effects of eating carbs) but could potentially give you an acute cognitive effect . No studies have looked directly at a TKD, but individuals who are training hard have reported great benefits with this type of approach. Keep in mind that your particular goal (fat loss, muscle gain, performance, etc.) will determine what is optimal for you.
Regardless, we do not recommend attempting a TKD until you are thoroughly keto-adapted, and then we suggest that you start by experimenting with consuming a small amount of carbohydrates before, during, and/or after your workout (i.e less than 30 grams).