Modified CnnNet constructor