UserWarning: Discrepancy between trainable weights and collected trainable weights, did you set `model.trainable` without calling `model.compile` after ? ‘Discrepancy between trainable weights and collected trainable’

 

UserWarning: Discrepancy between trainable weights and collected trainable weights, did you set model.trainable without calling model.compile after ? 'Discrepancy between trainable weights and collected trainable'

 

Solution: You should define layers before define models, and setting ‘trainable’ each time