Skip to content

Training a Model #13

@ldoyle4

Description

@ldoyle4

Hi Adina,

I have been trying to follow the tutorial on creating and training a CNN but I'm having issues when using cnn.train_models(). The error looks to be with tensorflow and that the loss functions receives 2 tensors with different shapes.... (my google attempt here https://stackoverflow.com/questions/58609967/tensorflow-2-0-condition-x-y-did-not-hold-element-wise).

here is the error:
tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [predictions must be >= 0] [Condition x >= y did not hold element-wise:] [x (sequential/dense_1/Sigmoid:0) = ] [[0.0393062606][0.0676076859][0.0730998814]...] [y (metrics/precision/Cast_2/x:0) = ] [0]

Was wondering if you can help?
I am basically trying to train my CNN using all of the flares from Guenther et al. 2020, as when I used the models in your example some of the flares from my lightcurve were being missed out.

Thanks,
Lauren

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions