Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

ResNet MLX #64

wants to merge 5 commits into from

Conversation

bdeanhardt
Copy link
Contributor

No description provided.

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)
Copy link
Collaborator

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

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)
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants