let conc_in_place net1 net2 = if get_out_size net1 != get_in_size net2 then raise (Invalid_argument "Net size does not match") else net1 @ net2