Code Monkey home page Code Monkey logo

Comments (3)

fzliu avatar fzliu commented on August 22, 2024

That is unfortunately due to the expensive CPU-to-GPU memory copies employed by the code in the master branch.

If you'd like a bit more speed (on par with the Torch implementations out there), try this version of Caffe: https://github.com/fzliu/caffe/tree/gram-layer, along with the gram-layer branch of this repository. That Caffe contains dpaiton's code for Gramian computation, which should speed things up significantly and better utilize the GPU.

from style-transfer.

ttoinou avatar ttoinou commented on August 22, 2024

Hi, ok I see. I'm wondering if everything shouldn't be done in CUDA or C++ AMP ? Python & lua are good for prototyping but if someone wants the algorithm to run really fast one has to port every piece of code to the GPU, no ?.

I'll try to compile the gram-layer Caffe and keep you up to date. Thank you for the code :) !

from style-transfer.

Darwin2011 avatar Darwin2011 commented on August 22, 2024

@fzliu I have tried what you suggest about gram layer, very huge speedup. Thank you!
But I find that when using python profiler to dig into it, Scipy optimizer costs quite a lot of times even though numpy now is compiled with multi-threads support.
Any suggestion about this performance issue?

Thank you.

from style-transfer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.