Deep Learning in Kotlin | Deep Neural Networks with KotlinDL

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • Deep Learning with Deep Neural Networks in Kotlin with KotlinDL!
    In this video, we're going to build, train, and evaluate a deep neural network in Kotlin. We're going to do some image classification on the MNIST handwritten digits dataset. To do so, we're going to use KotlinDL, a deep learning framework developed and maintained by the same company that also develops Kotlin (JetBrains). Currently, KotlinDL is in Alpha. It's a high-level deep learning API inspired by Keras and built on top of the Tensorflow 1.15 Java API. As the network for this task, we're going to use a fully-connected deep neural network consisting of an Input, a Flatten, two Dense, and an Output (also Dense) Layer. For training, we use the Adam Optimizer in standard configuration with the softmax cross-entropy loss function and accuracy as the metric. The 'summary' function prints out the model architecture. To train the model, we use the 'fit' function. Finally, we evaluate the model on the test set with the 'evaluate' function.
    KotlinDL GitHub repo:
    github.com/JetBrains/KotlinDL
    IntelliJ IDEA Community Version:
    www.jetbrains.com/idea/
    0:00 Introduction
    0:14 Project Setup
    1:21 KotlinDL Framework
    2:20 Task Description
    2:34 MNIST Dataset
    3:19 Model Creation
    5:08 Model Summary, Training, and Evaluation
    6:11 Results
    6:58 Outro
    @kotlin.learnings on Instagram:
    / kotlin.learnings
    @java.learnings on Instagram:
    / java.learnings
    Thank you for watching!

Komentáře • 11

  • @ldickmanns
    @ldickmanns  Před 3 lety +8

    Hey guys, those are the dependencies:
    dependencies {
    implementation("org.slf4j:slf4j-api:1.7.26")
    implementation("org.slf4j:slf4j-simple:1.7.26")
    implementation("org.jetbrains.kotlinx:kotlin-deeplearning-api:0.2.0")
    }
    Please share your thoughts and feedback in the comments! My idea for the next video is to create a convolutional neural network to improve upon the results of this video. Does that sound interesting to you guys?

    • @artsbrand
      @artsbrand Před 2 lety +1

      Please, give us the example of this image for tests. Thank you so much!

    • @ldickmanns
      @ldickmanns  Před 2 lety

      @@artsbrand I’ll create a GitHub with the code and data, okay?

    • @artsbrand
      @artsbrand Před 2 lety +1

      @@ldickmanns ok, thank you so much

  • @artsbrand
    @artsbrand Před 2 lety +2

    I reproduced this tutor and had same result! Thanks a lot for the tutorial!

    • @ldickmanns
      @ldickmanns  Před 2 lety

      Awesome! Was it easy to follow along?

    • @artsbrand
      @artsbrand Před 2 lety +1

      @@ldickmannsYes, make pls more tutorials by this theme

  • @gonzalodaquilemaperez37
    @gonzalodaquilemaperez37 Před 2 lety +1

    Hi, I have a Mac with M1 and I have tried to use this library but it does not work, maybe could you tell me how to fix it?

    • @ldickmanns
      @ldickmanns  Před 2 lety

      The library is quite new. Probably it’ll take some time. I also tried running it on GPU, but it didn’t work with my CUDA and cuDNN version. After asking in the #kotlindl Channel in Kotlin Slack, they told me that it’ll work with a future version. I can ask there for you if you want, but you can also join and ask yourself if you want. Does TensorFlow work in Python on your Mac?

  • @MarcelodeMouraSouza
    @MarcelodeMouraSouza Před rokem +1

    I tried but doesnt work. Could you share this project?

    • @ldickmanns
      @ldickmanns  Před rokem

      Does it work for you with this project: github.com/ldickmanns/deep-learning-in-kotlin