第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Maven pom.xml 參數(shù)將根據(jù)值 [重復(fù)] 安裝不同的依賴項(xiàng)

Maven pom.xml 參數(shù)將根據(jù)值 [重復(fù)] 安裝不同的依賴項(xiàng)

智慧大石 2023-05-24 15:32:23
我想在 Maven 上有一個(gè)屬性/參數(shù),它將根據(jù)參數(shù)安裝不同的依賴項(xiàng)。也就是說(shuō),當(dāng)用戶指定時(shí)-DgpuCuda=True,對(duì) pom.xml 的依賴會(huì)相應(yīng)改變。因此mvn -gpuCuda=True install將安裝 DL4J-GPU 而不是 DL4J-CPU。如果 -gpuCuda=True 被指定,那么這將被安裝:<dependency> <groupId>org.nd4j</groupId> <artifactId>nd4j-cuda-10.1</artifactId> <version>1.0.0-beta4</version></dependency>如果 -gpuCuda=False,這將被安裝:<dependency> <groupId>org.nd4j</groupId> <artifactId>nd4j-native</artifactId> <version>1.0.0-beta4</version></dependency>這可能嗎?解決方法是什么?謝謝!!
查看完整描述

1 回答

?
守著一只汪

TA貢獻(xiàn)1872條經(jīng)驗(yàn) 獲得超4個(gè)贊

你添加類似的東西


 <profiles>


    <profile>

      <id>gpu</id>

      <activation>

        <property>

          <name>gpuCuda</name>

          <value>True</value>

        </property>

      </activation>

      <dependencies>

        <dependency>

          <groupId>org.nd4j</groupId>

          <artifactId>nd4j-cuda-10.1</artifactId>

          <version>1.0.0-beta4</version>

        </dependency>

      </dependencies>

    </profile>


    <profile>

      <id>cpu</id>

      <activation>

        <property>

          <name>gpuCuda</name>

          <value>False</value>

        </property>

      </activation>

      <dependencies>

        <dependency>

           <groupId>org.nd4j</groupId>

           <artifactId>nd4j-native</artifactId>

           <version>1.0.0-beta4</version>

        </dependency>

      </dependencies>

    </profile>

</profiles

然后,您可以通過(guò)您聲明的命令行屬性激活/停用配置文件,例如mvn -DgpuCuda=True install.


查看完整回答
反對(duì) 回復(fù) 2023-05-24
  • 1 回答
  • 0 關(guān)注
  • 164 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)