【问题标题】:How to setup AI in springboot kotlin poject如何在 spring boot kotlin 项目中设置 AI
【发布时间】:2021-08-24 09:01:58
【问题描述】:

我想在我的项目中使用深度学习 java 库。但我不能 在我的基于 Spring Boot kotlin Gradle 的项目中设置 AI DJL。我用 Buildgradle.kts ,但我不知道如何添加 ai.djl buildgradle.kts。

【问题讨论】:

    标签: spring-boot kotlin djl


    【解决方案1】:

    DJL 提供 springboot 启动包,你可以在你的 build.gradle.kts 中添加以下部分:

    dependencies {
        implementation("org.springframework.boot:spring-boot-starter-web")
        implementation("ai.djl.spring:djl-spring-boot-starter-pytorch-auto:0.11")
        implementation("org.springframework.boot:spring-boot-starter-actuator")
        testImplementation("org.springframework.boot:spring-boot-starter-test") {
            exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
        }
        // See: https://github.com/awslabs/djl/blob/master/mxnet/mxnet-engine/README.md for MXNet library selection
    }
    

    您可以从 github 找到 DJL springboot starter 演示项目:https://github.com/deepjavalibrary/djl-spring-boot-starter-demo

    【讨论】:

      猜你喜欢
      • 2020-07-30
      • 1970-01-01
      • 2019-07-02
      • 2019-03-02
      • 1970-01-01
      • 2016-05-15
      • 2018-11-29
      • 2019-11-27
      • 2021-10-29
      相关资源
      最近更新 更多