8 votes

Keras or PyTorch as your first deep learning framework

6 comments

  1. joelthelion
    Link
    A good read on the trade-offs made by these two very popular deep learning frameworks. While both are excellent, they have quite different approaches to the question.

    A good read on the trade-offs made by these two very popular deep learning frameworks. While both are excellent, they have quite different approaches to the question.

    1 vote
  2. [4]
    deciduous
    Link
    Good article, but it failed to really discuss the advantages of using one of these over just tensorflow.

    Good article, but it failed to really discuss the advantages of using one of these over just tensorflow.

    1 vote
    1. joelthelion
      Link Parent
      It does mention that tensorflow is extremely verbose.

      It does mention that tensorflow is extremely verbose.

      1 vote
    2. [2]
      clerical_terrors
      Link Parent
      I'm using Keras with R for my university courses, it adds an extra layer of abstraction which makes the experience a little more easier and intuitive. Keras feels like a good place to start even...

      I'm using Keras with R for my university courses, it adds an extra layer of abstraction which makes the experience a little more easier and intuitive. Keras feels like a good place to start even if your goal is to ultimately use Tensorflow on it's own.

      1 vote
      1. deciduous
        Link Parent
        I've used both tensorflow and keras before. I agree Keras is easier, I just wanted the article to actually go into the differences between the two like it claimed it would at the start. I actually...

        I've used both tensorflow and keras before. I agree Keras is easier, I just wanted the article to actually go into the differences between the two like it claimed it would at the start.

        I actually had to write some tensorflow code that didn't even use tf.layers for a course last year, so I really don't mind the code being more verbose. For me, the other features mentioned in the article, specifically debugging, feel like stronger reasons to choose Keras over just tensorflow. Tf.layers is already a pretty big abstraction and the difference between 1 line of simple code and 5 lines of simple code isn't much.

  3. dnaq
    Link
    I would recommend starting with pytorch. It’s really simple to get started with it, but it also doesn’t constrain you in what you can do at all. Keras is really nice from a beginner point of view,...

    I would recommend starting with pytorch. It’s really simple to get started with it, but it also doesn’t constrain you in what you can do at all.

    Keras is really nice from a beginner point of view, but it can get hairy to work with as soon as you want to do stuff that it doesn’t support.

    Raw tensorflow is really powerful, but unfortunately one of the worst examples of API design that I’ve seen. Pytorch combines the power of tensorflow with the ease-of-use of keras and is usually as fast as well. Part of the ease of use is the dynamic execution graph, but a large part of it is well thought out API design.

    1 vote