mvaldenegro / keras-uncertainty

Utilities to perform Uncertainty Quantification on Keras Models
GNU Lesser General Public License v3.0
113 stars 22 forks source link

about Deep semble #2

Open guanhdrmq opened 3 years ago

guanhdrmq commented 3 years ago

Hi Matitas,

How are you ?

I have a few codes as follows:

def build_model(): model = merge_audio_video()

model.compile(optimizer="adam",
              loss='categorical_crossentropy',
              #loss=triplet_loss_adapted_from_tf,
              metrics=['accuracy', precision, recall, f1]
              )
from keras_uncertainty.models import DeepEnsembleClassifier
num_ensembles = 5
model = DeepEnsembleClassifier(model, num_ensembles)
return model

When using your code, there is one TypeError: call() missing 1 required positional argument: 'inputs'. Can you help me? Thank you so much.

mvaldenegro commented 3 years ago

Hello, the problem is that the first parameter to DeepEnsembleClassifier is not a model but a function that builds and returns a model, that is why you get an error.