Skip to content

ResNet MLX#64

Open
bdeanhardt wants to merge 5 commits intoapple:mainfrom
bdeanhardt:bella/ResNet_MLX
Open

ResNet MLX#64
bdeanhardt wants to merge 5 commits intoapple:mainfrom
bdeanhardt:bella/ResNet_MLX

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
Contributor

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
Contributor

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