Skip to content

Commit 434bbe6

Browse files
committed
Improving Package.swift introduction.
1 parent c08d199 commit 434bbe6

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Also, there are many features that has already embedded in the testing script, s
7878

7979
### TensorFlow C API Library Installation
8080

81-
Perfect-TensorFlow is based on TensorFlow C API, i.e., `libtensorflow.so` on runtime.
82-
This project contains an express CPU version installation script for this module on both macOS / Ubuntu Linux, and will install the dynamic library into path `/usr/local/lib/libtensorflow.so`. You can download & run [`install.sh`](https://github.com/PerfectlySoft/Perfect-TensorFlow/blob/master/install.sh). Before running this script, please make sure that `curl` has been installed onto your computer.
81+
Perfect-TensorFlow is based on TensorFlow C API, i.e., `libtensorflow.so` and `libtensorflow_framework.so` on runtime.
82+
This project contains an express CPU version installation script for this module on both macOS / Ubuntu Linux, and will install both dynamic libraries into path `/usr/local/lib`. You can download & run [`install.sh`](https://github.com/PerfectlySoft/Perfect-TensorFlow/blob/master/install.sh). Before running this script, please make sure that `curl` has been installed onto your computer.
8383

8484
For more installation options, such as GPU/CPU and multiple versions on the same machine, please check TensorFlow website: [Installing TensorFlow for C](https://www.tensorflow.org/install/install_c)
8585

@@ -88,7 +88,13 @@ For more installation options, such as GPU/CPU and multiple versions on the same
8888
To use this library, add dependencies to your project's Package.swift with the **LATEST TAG**:
8989

9090
``` swift
91-
.Package(url: "https://github.com/PerfectlySoft/Perfect-TensorFlow.git", majorVersion: 1)
91+
.package(url: "https://github.com/PerfectlySoft/Perfect-TensorFlow.git", from: "1.4.0")
92+
```
93+
94+
and it also requires a dependency declaration in the same file, `target` section:
95+
96+
``` swift
97+
dependencies: ["PerfectTensorFlow"]
9298
```
9399

94100
Then declare the library:

README.zh_CN.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ Sources
7878

7979
### TensorFlow API C语言库函数安装
8080

81-
Perfect-TensorFlow 是基于其C语言函数库基础上的,简单说来就是您的计算机上在运行时必须安装 `libtensorflow.so`动态链接库。
81+
Perfect-TensorFlow 是基于其C语言函数库基础上的,简单说来就是您的计算机上在运行时必须安装 `libtensorflow.so``libtensorflow_framework.so` 动态链接库。
8282

83-
本项目包含了一个用于快速安装该链接库 CPU 版本的脚本,默认安装路径为`/usr/local/lib/libtensorflow.so`。您可以根据平台要求下载并运行 [`install.sh`](https://github.com/PerfectlySoft/Perfect-TensorFlow/blob/master/install.sh)。运行该脚本之前请确定 `curl`已经安装到您的计算机上。
83+
本项目包含了一个用于快速安装该链接库 CPU 版本的脚本,默认安装路径为`/usr/local/lib`。您可以根据平台要求下载并运行 [`install.sh`](https://github.com/PerfectlySoft/Perfect-TensorFlow/blob/master/install.sh)。运行该脚本之前请确定 `curl`已经安装到您的计算机上。
8484

8585

8686
更多的安装选项,如需要在同一台计算机上同时安装CPU/GPU或者多个不同版本,请参考官网网站: [Installing TensorFlow for C](https://www.tensorflow.org/install/install_c)
@@ -90,7 +90,12 @@ Perfect-TensorFlow 是基于其C语言函数库基础上的,简单说来就是
9090
使用之前请在您的项目Package.swift文件中增加依存关系并选择**最新版本**
9191

9292
``` swift
93-
.Package(url: "https://github.com/PerfectlySoft/Perfect-TensorFlow.git", majorVersion: 1)
93+
.package(url: "https://github.com/PerfectlySoft/Perfect-TensorFlow.git", from: "1.4.0")
94+
```
95+
同一个文件中还要在`target` 目标段声明依存关系:
96+
97+
``` swift
98+
dependencies: ["PerfectTensorFlow"]
9499
```
95100

96101
然后声明函数库:

0 commit comments

Comments
 (0)