Neural style transfer, distilled to a clean TensorFlow core
A lean TensorFlow reimplementation of the neural style paper that swaps the original L-BFGS optimizer for Adam, trading a simpler codebase for a little extra knob-twiddling.

What it does Takes a content photo and a style image (or two, blended by weight) and repaints the content in the style’s textures and colors using a pre-trained VGG-19 network. It is a direct, command-line implementation of the original neural style transfer paper, optimized with Adam rather than the authors’ preferred L-BFGS.
The interesting bit The author claims this version is notably simpler than most implementations because it leans on TensorFlow’s automatic differentiation instead of hand-rolled gradient logic. That convenience comes with a trade-off: TensorFlow lacks L-BFGS support, so the optimizer switch to Adam can demand more careful tuning of weights and learning rates to avoid muddy results.
Key highlights
- Supports blending multiple style images with per-style weights.
- Exposes fine-grained controls like
--style-layer-weight-expto shift between coarse and fine feature transfer, and--preserve-colorsto keep the original palette while borrowing texture. - Runs offline once you supply the pre-trained VGG-19 weights.
- Generates a 512×512 output in roughly 90 seconds on an M3 MacBook Pro at the default 1000 iterations; faster on discrete GPUs.
Caveats
- Requires downloading a separate pre-trained VGG-19 network file before it will run.
- Because it uses Adam instead of L-BFGS, you may need to spend more time tuning
--content-weight,--style-weight, and--learning-ratefor some image combinations. - The README warns that certain images or output sizes are finicky and may not “just work” with defaults.
Verdict Good for developers who want a readable, hackable neural style baseline in modern TensorFlow. Skip it if you need turnkey, one-click results or real-time feed-forward speed; the author explicitly points to fast-neural-style projects for that.
Frequently asked
- What is anishathalye/neural-style?
- A lean TensorFlow reimplementation of the neural style paper that swaps the original L-BFGS optimizer for Adam, trading a simpler codebase for a little extra knob-twiddling.
- Is neural-style open source?
- Yes — anishathalye/neural-style is open source, released under the GPL-3.0 license.
- What language is neural-style written in?
- anishathalye/neural-style is primarily written in Python.
- How popular is neural-style?
- anishathalye/neural-style has 5.5k stars on GitHub.
- Where can I find neural-style?
- anishathalye/neural-style is on GitHub at https://github.com/anishathalye/neural-style.