Thanks for the shape information.
The weight matrices alone will take approx. 165GB.
If we ignore the bias, you can calculate the memory footprint of e.g. the last linear layer’s weight matrix using:
256*22*22 * 256*32*32 * 4 / 1024**3 = 121 GB

I assume you are using float32 values, which explains the multiplication with 4, as float32 needs 4 Bytes. The division by 1024**3 gives us the memory in GB.