简体   繁体   中英

Conv2D to Conv3D

I have 3D medical images and wanted to know if I have a CNN that uses Conv2D can I just change the Conv2D to a Conv3D ? If not what would I need to change?

Yes, you can, but there are a few things to change.

Your kernel will now need to be in 3D, so the argument kernel_size must be a 3 integer tuple. Same thing for strides . Note that the CNN you will modify will probably be in 3D already (eg, 60, 60, 3) if it's designed to train on colored images. The only difference is that you want the neural net to not only detect features in 3 separate 60x60 windows, but through the three windows. In other words, not 3 times 2D, but 3D.

tl;dr yes you can, just change kernel_size and strides . The default values of the keras.layers.Conv3D are adjusted accordingly anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM