Comments (2)
I have implemented some CNN layers here: https://github.com/robertmccraith/mimm
More models to be implemented over time, feel free to contribute
from mlx.
Don't know if it is going to be the next release but we probably will implement fast pooling and/or upsampling operations.
In the meantime you can do some of those using array operations like the upsampling 2d in the stable diffusion example:
def upsample_nearest(x, scale: int = 2):
B, H, W, C = x.shape
x = mx.broadcast_to(x[:, :, None, :, None, :], (B, H, scale, W, scale, C))
x = x.reshape(B, H * scale, W * scale, C)
return x
or use strided conv or reshapes to do pooling operations (haven't tested the code below but it should work):
def avg_pool_2d(x, stride: int = 2):
B, W, H, C = x.shape
x = x.reshape(B, W//stride, stride, H//stride, stride, C).mean((2, 4))
return x
from mlx.
Related Issues (20)
- Question about supporting slices of the type a[:, [0]] HOT 2
- Difference in training convergence between PyTorch & MLX HOT 2
- [BUG] mlx.core.topk throws segmentation fault for large dimension HOT 1
- [BUG] JIT compile mode does not work with LoRA
- [Feature] dlpack device HOT 5
- [BUG] Compiled mx.eval(model.state) raises “Attempting to eval an array without a primitive” with mlx.optimizers.Adam HOT 4
- [BUG] compile + checkpoint segfaults HOT 1
- [BUG] Wrong result for sliced matmul on GPU HOT 1
- I'm asking for help with the following error: HOT 1
- [Enhancement] be able to override MLX_METAL_VERSION when running cmake
- Potential mx.load() issue with quantized GGUF's HOT 1
- gpt-neox HOT 4
- Implement a `torch.rand_like` equivalent? HOT 5
- [Feature] Export Lora Adapters as GGML
- [Feature] Add nan_to_num Function HOT 2
- [Potential BUG] Latency differs for different runs HOT 3
- [Question] Performance of mx.fast.scaled_dot_product_attention HOT 5
- Potential Bug in Distributed Communication HOT 20
- Unexpected scatter behavior HOT 3
- [Issue] Request to support macOS x64 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlx.