package dp; component Featureextraction { ports in Z(0:255)^{3, 210, 280} imageIn, out Q(0:1)^{13,1,1} affordanceOut; implementation CNN { def conv(kernel, channels, hasPool=true, convStride=(1,1)){ Convolution(kernel=kernel, channels=channels, stride=convStride) -> Relu() -> Pooling(pool_type="max", kernel=(3,3), stride=(2,2), ?=hasPool) } def fc(){ FullyConnected(units=4096) -> Relu() -> Dropout() } imageIn -> conv(kernel=(11,11), channels=96, convStride=(4,4)) -> conv(kernel=(5,5), channels=256, convStride=(4,4)) -> conv(kernel=(3,3), channels=384, hasPool=false) -> conv(kernel=(3,3), channels=384, hasPool=false) -> conv(kernel=(3,3), channels=256) -> fc() -> fc() -> FullyConnected(units=13) -> Sigmoid() -> affordanceOut } }