<tensorflow.python.keras.callbacks.History at 0x279ceba2288>

Viewed 2988

I build the following DL model based on Tensorflow/Keras but it raises the following error

    model = keras.Sequential()
    model.add(layers.Dense(263, input_dim=263, activation='relu'))
    model.add(layers.Dense(256, activation='relu',kernel_regularizer=regularizers.l2(0.01)))
    model.add(layers.Dense(128, activation='relu'))
    model.add(layers.Dropout(0.1))
    model.add(layers.Dense(56, activation='relu'))
    model.add(layers.Dense(16, activation='relu'))
    model.add(layers.Dropout(0.1))
    model.add( layers.Dense(1, activation='sigmoid', name='class'))
    model.compile(loss='binary_crossentropy',loss_weights={'class':0.5}, optimizer='adam', metrics=['accuracy'])
    model.fit(X_train,Y_train, epochs=20, verbose=0)
<tensorflow.python.keras.callbacks.History at 0x279ceba2288>

any one help me why this error arises ???

is it related to tensorflow version?

1 Answers

I can be mistaken, but afaik keras.callbacks.history is just an output object from your fitting, so you can somehow use one specific 'fit' if you initialize your model multiple time

Related