# Wrapping a Flux FCN model with MLJFlux

**URL:** https://discourse.julialang.org/t/wrapping-a-flux-fcn-model-with-mljflux/132024
**Category:** General Usage
**Tags:** flux, mljflux
**Created:** [September 1, 2025, 3:51pm UTC](https://discourse.julialang.org/t/wrapping-a-flux-fcn-model-with-mljflux/132024 "2025-09-01T15:51:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cirobr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cirobr/32/219994_2.png) [@cirobr](https://discourse.julialang.org/u/cirobr)
#### Post date: [September 1, 2025, 3:51pm UTC](https://discourse.julialang.org/t/wrapping-a-flux-fcn-model-with-mljflux/132024/1 "2025-09-01T15:51:49Z")

</div>

Cheers,

I wonder if it is possible to wrap a fully convolutional network written in Flux (e.g. a U-Net) with MLJFlux, and benefit from the high-level interface from MLJ. FCN outputs are typically multi-dimensional array (as in the U-Net), rather than a vector (one-dimension array, as in a classifier) as stated in [this](https://fluxml.ai/MLJFlux.jl/dev/interface/Custom%2520Builders/) page:

> The object returned by `chain(x)` must be an `AbstractFloat` vector of length `n_out`

If MLJ is indeed not feasible for this task, please kindly advise on alternatives that could provide high-level interface (e.g. cross-validation) for such Flux models.

Thanks in advance.
