autokeras
autokeras copied to clipboard
[Question] Using complex custom modalities with AutoKeras
Firstly, thanks a lot to the authors and maintainers for providing such a versatile and dynamic tool! 🚀
I had a dataset with an image, on which I would like to regress 2 different floats/per image. I believe such a task comes under the Multi-Task category of the documentation.
In such a case where the output heads are actually the same, does something like this work:-
# Initialize the multi with multiple inputs and outputs.
model = ak.AutoModel(
inputs=[ak.ImageInput()],
outputs=[
ak.RegressionHead(metrics=["mae"]),
ak.RegressionHead(metrics=["mae"])), # 2 regression heads, for 2 continuous variables
],
overwrite=True,
max_trials=2,
I assume that its computing something like how torch does behind the scenes
criterion_1 = MAE()
criterion_2 = MAE()
loss = criterion_1(regression_head_1, gt_1) + criterion_2(regression_head_2, gt_2)
loss.backward()
......
Where it forms 2 different criteria and is backpropagated together.
So would passing my data with such an architecture be enough for AutoKeras to backprop? if there are modifications to be made, could you kindly provide me with the base files where I can start from?
- and just a last teeny question, my ground truth targets are pretty small, near about
1e-3or so. Should I artificially scale them with a multiplier, or doesAutoKerashandle the scaling on its own?
Many Many Thanks 🤗
@haifeng-jin I know you might be busy with a lot of work, but if you could just take out 2 minutes and provide some guidance; it would be very, very welcome!