Hi every one
I have two gpu cards(3090) to execute two different tensorflow(2.9.1) programs. Each of the programs may consume over half of cpu memory (512GB) on my computer.
When I executed the programs written in the functional API style(model.fit was used), the two programs carried out the training with cpu memory consumption around 90 %. However after I rewrote the programs in the subclassing style, the programs or the computer were stopped on the way after the cpu memory consumption of around 100%.
I tested to limit the buffersize in prefetch() and size in batch() in the pipline of the input data, however there is no effect.
How can I limit the cpu memory consumption in the subclassing style?