<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 安裝指南 該頁面是 LightGBM CLI 版本的構建指南. 要構建 Python 和 R 的軟件包, 請分別參閱 [Python-package](https://github.com/Microsoft/LightGBM/tree/master/python-package) 和 [R-package](https://github.com/Microsoft/LightGBM/tree/master/R-package) 文件夾. ## Windows LightGBM 可以使用 Visual Studio, MSBuild 與 CMake 或 MinGW 來在 Windows 上構建. ### Visual Studio (or MSBuild) #### 使用 GUI 1. 安裝 [Visual Studio](https://www.visualstudio.com/downloads/) (2015 或更新版本). 2. 下載 [zip archive](https://github.com/Microsoft/LightGBM/archive/master.zip) 并且 unzip(解壓)它. 3. 定位到 `LightGBM-master/windows` 文件夾. 4. 使用 Visual Studio 打開 `LightGBM.sln` 文件, 選擇 `Release` 配置并且點擊 `BUILD`-&gt;`Build Solution (Ctrl+Shift+B)`. 如果出現有關 **Platform Toolset** 的錯誤, 定位到 `PROJECT`-&gt;`Properties`-&gt;`Configuration Properties`-&gt;`General` 然后選擇 toolset 安裝到你的機器. 該 exe 文件可以在 `LightGBM-master/windows/x64/Release` 文件夾中找到. #### 使用命令行 1. 安裝 [Git for Windows](https://git-scm.com/download/win), [CMake](https://cmake.org/) (3.8 或更新版本) 以及 [MSBuild](https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017) (**MSBuild** 是非必要的, 如果已安裝 **Visual Studio** (2015 或更新版本) 的話). 2. 運行以下命令: ``` git clone --recursive https://github.com/Microsoft/LightGBM cd LightGBM mkdir build cd build cmake -DCMAKE_GENERATOR_PLATFORM=x64 .. cmake --build . --target ALL_BUILD --config Release ``` 這些 exe 和 dll 文件可以在 `LightGBM/Release` 文件夾中找到. ### MinGW64 1. 安裝 [Git for Windows](https://git-scm.com/download/win), [CMake](https://cmake.org/) 和 [MinGW-w64](https://mingw-w64.org/doku.php/download). 2. 運行以下命令: ``` git clone --recursive https://github.com/Microsoft/LightGBM cd LightGBM mkdir build cd build cmake -G "MinGW Makefiles" .. mingw32-make.exe -j4 ``` 這些 exe 和 dll 文件可以在 `LightGBM/` 文件夾中找到. **注意**: 也許你需要再一次運行 `cmake -G "MinGW Makefiles" ..` 命令, 如果遇到 `sh.exe was found in your PATH` 錯誤的話. 也許你還想要參閱 [gcc 建議](./gcc-Tips.rst). ## Linux LightGBM 使用 **CMake** 來構建. 運行以下命令: ``` git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM mkdir build ; cd build cmake .. make -j4 ``` **注意**: glibc &gt;= 2.14 是必須的. 也許你還想要參閱 [gcc 建議](./gcc-Tips.rst). ## OSX LightGBM 依賴于 **OpenMP** 進行編譯, 然而 Apple Clang 不支持它. 請使用以下命令來安裝 **gcc/g++** : ``` brew install cmake brew install gcc --without-multilib ``` 然后安裝 LightGBM: ``` git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM export CXX=g++-7 CC=gcc-7 mkdir build ; cd build cmake .. make -j4 ``` 也許你還想要參閱 [gcc 建議](./gcc-Tips.rst). ## Docker 請參閱 [Docker 文件夾](https://github.com/Microsoft/LightGBM/tree/master/docker). ## Build MPI 版本 LightGBM 默認的構建版本是基于 socket 的的. LightGBM 也支持 [MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface). MPI 是一種與 [RDMA](https://en.wikipedia.org/wiki/Remote_direct_memory_access) 支持的高性能通信方法. 如果您需要運行具有高性能通信的并行學習應用程序, 則可以構建帶有 MPI 支持的 LightGBM. ### Windows #### 使用 GUI 1. 需要先安裝 [MS MPI](https://www.microsoft.com/en-us/download/details.aspx?id=49926) . 需要 `msmpisdk.msi` 和 `MSMpiSetup.exe`. 2. 安裝 [Visual Studio](https://www.visualstudio.com/downloads/) (2015 或更新版本). 3. 下載 [zip archive](https://github.com/Microsoft/LightGBM/archive/master.zip) 并且 unzip(解壓)它. 4. 定位到 `LightGBM-master/windows` 文件夾. 5. 使用 Visual Studio 打開 `LightGBM.sln` 文件, 選擇 `Release_mpi` 配置并且點擊 `BUILD`-&gt;`Build Solution (Ctrl+Shift+B)`. 如果遇到有關 **Platform Toolset** 的錯誤, 定位到 `PROJECT`-&gt;`Properties`-&gt;`Configuration Properties`-&gt;`General` 并且選擇安裝 toolset 到你的機器上. 該 exe 文件可以在 `LightGBM-master/windows/x64/Release_mpi` 文件夾中找到. #### 使用命令行 1. 需要先安裝 [MS MPI](https://www.microsoft.com/en-us/download/details.aspx?id=49926) . 需要 `msmpisdk.msi` 和 `MSMpiSetup.exe`. 2. 安裝 [Git for Windows](https://git-scm.com/download/win), [CMake](https://cmake.org/) (3.8 或更新版本) 和 [MSBuild](https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017) (MSBuild 是非必要的, 如果已安裝 **Visual Studio** (2015 或更新版本)). 3. 運行以下命令: ``` git clone --recursive https://github.com/Microsoft/LightGBM cd LightGBM mkdir build cd build cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_MPI=ON .. cmake --build . --target ALL_BUILD --config Release ``` 這些 exe 和 dll 文件可以在 `LightGBM/Release` 文件夾中找到. **注意**: Build MPI version 通過 **MinGW** 來構建 MPI 版本的不支持的, 由于它里面缺失了 MPI 庫. ### Linux 需要先安裝 [Open MPI](https://www.open-mpi.org/) . 然后運行以下命令: ``` git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM mkdir build ; cd build cmake -DUSE_MPI=ON .. make -j4 ``` **Note**: glibc &gt;= 2.14 是必要的. ### OSX 先安裝 **gcc** 和 **Open MPI** : ``` brew install openmpi brew install cmake brew install gcc --without-multilib ``` 然后運行以下命令: ``` git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM export CXX=g++-7 CC=gcc-7 mkdir build ; cd build cmake -DUSE_MPI=ON .. make -j4 ``` ## Build GPU 版本 ### Linux 在編譯前應該先安裝以下依賴: * OpenCL 1.2 headers and libraries, 它們通常由 GPU 制造商提供. The generic OpenCL ICD packages (for example, Debian package `cl-icd-libopencl1` and `cl-icd-opencl-dev`) can also be used. * libboost 1.56 或更新版本 (1.61 或最新推薦的版本). We use Boost.Compute as the interface to GPU, which is part of the Boost library since version 1.61\. However, since we include the source code of Boost.Compute as a submodule, we only require the host has Boost 1.56 or later installed. We also use Boost.Align for memory allocation. Boost.Compute requires Boost.System and Boost.Filesystem to store offline kernel cache. The following Debian packages should provide necessary Boost libraries: `libboost-dev`, `libboost-system-dev`, `libboost-filesystem-dev`. * CMake 3.2 或更新版本. 要構建 LightGBM GPU 版本, 運行以下命令: ``` git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM mkdir build ; cd build cmake -DUSE_GPU=1 .. # if you have installed the NVIDIA OpenGL, please using following instead # sudo cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -OpenCL_INCLUDE_DIR=/usr/local/cuda/include/ .. make -j4 ``` ### Windows 如果使用 **MinGW**, 該構建過程類似于 Linux 上的構建. 相關的更多細節請參閱 [GPU Windows 平臺上的編譯](./GPU-Windows.rst) . 以下構建過程適用于 MSVC (Microsoft Visual C++) 構建. 1. 安裝 [Git for Windows](https://git-scm.com/download/win), [CMake](https://cmake.org/) (3.8 or higher) 和 [MSBuild](https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017) (MSBuild 是非必要的, 如果已安裝 **Visual Studio** (2015 或更新版本)). 2. 針對 Windows 平臺安裝 **OpenCL** . 安裝取決于你的 GPU 顯卡品牌 (NVIDIA, AMD, Intel). * 要運行在 Intel 上, 獲取 [Intel SDK for OpenCL](https://software.intel.com/en-us/articles/opencl-drivers). * 要運行在 AMD 上, 獲取 [AMD APP SDK](http://developer.amd.com/amd-accelerated-parallel-processing-app-sdk/). * 要運行在 NVIDIA 上, 獲取 [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads). 3. 安裝 [Boost Binary](https://sourceforge.net/projects/boost/files/boost-binaries/1.64.0/). **注意**: 要匹配你的 Visual C++ 版本: Visual Studio 2015 -&gt; `msvc-14.0-64.exe`, Visual Studio 2017 -&gt; `msvc-14.1-64.exe`. 4. 運行以下命令: ``` Set BOOST_ROOT=C:\local\boost_1_64_0\ Set BOOST_LIBRARYDIR=C:\local\boost_1_64_0\lib64-msvc-14.0 git clone --recursive https://github.com/Microsoft/LightGBM cd LightGBM mkdir build cd build cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 .. cmake --build . --target ALL_BUILD --config Release ``` **注意**: `C:\local\boost_1_64_0\` 和 `C:\local\boost_1_64_0\lib64-msvc-14.0` 是你 Boost 二進制文件的位置. 你還可以將它們設置為環境變量, 以在構建時避免 `Set ...` 命令. ### Protobuf 支持 如果想要使用 protobuf 來保存和加載模型, 請先安裝 [protobuf c++ version](https://github.com/google/protobuf/blob/master/src/README.md) . 然后使用 USE_PROTO=ON 配置來運行 cmake 命令, 例如: ``` cmake -DUSE_PROTO=ON .. ``` 然后在保存或加載模型時, 可以在參數中使用 `model_format=proto`. **注意**: 針對 windows 用戶, 它只對 mingw 進行了測試. ### Docker 請參閱 [GPU Docker 文件夾](https://github.com/Microsoft/LightGBM/tree/master/docker/gpu).
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看