-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResNet MLX #64
base: main
Are you sure you want to change the base?
ResNet MLX #64
Conversation
N = h.size(0) // ta.size(0) | ||
ta = einops.repeat(ta, "b c h w -> (b n) c h w", n=N) | ||
tb = einops.repeat(tb, "b c h w -> (b n) c h w", n=N) | ||
h = nn.silu(self.norm2(h) * (1 + ta) + tb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try printing the shapes or returning early (in both the pytorch and the mlx version) to see if the tensor shapes are the same up to this point
ml_mdm/models/unet_mlx.py
Outdated
bias=True, | ||
) | ||
self.time_layer = nn.Linear(time_emb_channels, config.output_channels * 2) | ||
self.norm2 = nn.GroupNorm(config.num_groups_norm, config.output_channels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytorch_compatible=True
mlx docs show these a difference between max and pytorch implementation
No description provided.