Generative_Deep_Learning_2nd_Edition icon indicating copy to clipboard operation
Generative_Deep_Learning_2nd_Edition copied to clipboard

Issue with AdamW on Apple M1

Open sigma-andex opened this issue 2 years ago • 0 comments

There seems to be a problem when trying to run the denoising diffusion models on Apple Silicon. This seems to be the related keras issue: https://github.com/keras-team/tf-keras/issues/176 See also: https://developer.apple.com/forums/thread/729732

I was able to get it running using the legacy.Adam optimizer:

ddm.compile(
    # optimizer=optimizers.experimental.AdamW(
    #     learning_rate=LEARNING_RATE, weight_decay=WEIGHT_DECAY
    # ),
    optimizer=optimizers.legacy.Adam(
        learning_rate=LEARNING_RATE
    ),
    loss=losses.mean_absolute_error,
)

Not sure how this effects the quality of this model though...

sigma-andex avatar Jul 10 '23 16:07 sigma-andex