swift-models

Models and examples built with Swift for TensorFlow

  • 所有者: tensorflow/swift-models
  • 平台:
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Swift for TensorFlow Models

This repository contains TensorFlow models written in Swift.

Use the tensorflow-xx branch that corresponds to the release you are using from Swift for TensorFlow releases. For example, for the 0.6 release, use the tensorflow-0.6 branch.

Actual development occurs on the master branch.
As new packages are released, master is pushed to stable.

For general information about Swift for TensorFlow development, please visit
tensorflow/swift.

Development

Use Swift Package Manager to develop Swift for TensorFlow models.

Build

swift build

Test

swift test

Experimental CMake Support

There is experimental support for building with CMake. This is required to build the models on Windows, and can also be used to cross-compile the models and the demo programs.

NOTE: tests are currently not supported with the CMake based build.

It is highly recommended that you use CMake 3.16 or newer to ensure that -B and parallel builds function properly in the example commands below.

macOS:

cmake                                                              \
  -B /BinaryCache/tensorflow-swift-models                          \
  -D CMAKE_BUILD_TYPE=Release                                      \
  -D CMAKE_Swift_COMPILER=$(TOOLCHAINS=tensorflow xcrun -f swiftc) \
  -G Ninja                                                         \
  -S /SourceCache/tensorflow-swift-models

Linux:

cmake                                     \
  -B /BinaryCache/tensorflow-swift-models \
  -D CMAKE_BUILD_TYPE=Release             \
  -D CMAKE_Swift_COMPILER=$(which swiftc) \
  -G Ninja                                \
  -S /SourceCache/tensorflow-swift-models

Windows:

set SDKROOT=C:/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk
"%ProgramFiles%\CMake\bin\cmake.exe"                                                                                 ^
  -B C:/BinaryCache/tensorflow-swift-models                                                                          ^
  -D BUILD_SHARED_LIBS=YES                                                                                           ^
  -D CMAKE_BUILD_TYPE=Release                                                                                        ^
  -D CMAKE_Swift_COMPILER=C:/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe ^
  -D CMAKE_Swift_FLAGS="-sdk %SDKROOT% -I %SDKROOT%/usr/lib/swift -L %SDKROOT%/usr/lib/swift/windows"                ^
  -G Ninja                                                                                                           ^
  -S C:/SourceCache/tensorflow-swift-models

Bugs

Please report model-related bugs and feature requests using GitHub issues in
this repository.

Community

Discussion about Swift for TensorFlow happens on the
swift@tensorflow.org
mailing list.

Contributing

We welcome contributions: please read the Contributor Guide
to get started. It's always a good idea to discuss your plans on the mailing
list before making any major submissions.

Code of Conduct

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, education, socio-economic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.

The Swift for TensorFlow community is guided by our Code of
Conduct
, which we encourage everybody to read before
participating.

主要指標

概覽
名稱與所有者tensorflow/swift-models
主編程語言Jupyter Notebook
編程語言Swift (語言數: 8)
平台
許可證Apache License 2.0
所有者活动
創建於2018-04-24 19:21:41
推送於2025-02-13 16:35:15
最后一次提交
發布數0
用户参与
星數647
關注者數43
派生數149
提交數555
已啟用問題?
問題數147
打開的問題數45
拉請求數524
打開的拉請求數1
關閉的拉請求數66
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?