GithubHelp home page GithubHelp logo

isabella232 / swift-models Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tensorflow/swift-models

0.0 0.0 0.0 69.21 MB

Models and examples built with Swift for TensorFlow

License: Apache License 2.0

Swift 38.99% Python 0.16% Dockerfile 0.03% Jupyter Notebook 49.54% CMake 1.00% C 10.24% Shell 0.04%

swift-models's Introduction

Swift for TensorFlow Models

This repository contains TensorFlow models written in Swift.

Active development occurs on the main branch.

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.

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

Development

macOS and Linux

Use Swift Package Manager to develop Swift for TensorFlow models.

Build

swift build

Test

swift test

Windows

Build

swift build -Xswiftc -use-ld=lld -c release

Test

swift test -Xswiftc -use-ld=lld -c debug

Using CMake for Development

Use CMake to develop Swift for TensorFlow models.

Experimental CMake Support

There is experimental support for building with CMake. This can be used to cross-compile the models and the demo programs.

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. To install this version on Ubuntu, we recommend following the instructions at Kitware's apt repo.

Prerequisite: Ninja build tool. Find installation commands for your favorite package manager here.

macOS:

# Configure
cmake                                                              \
  -B /BinaryCache/tensorflow-swift-models                          \
  -D BUILD_TESTING=YES                                             \
  -D CMAKE_BUILD_TYPE=Release                                      \
  -D CMAKE_Swift_COMPILER=$(TOOLCHAINS=tensorflow xcrun -f swiftc) \
  -G Ninja                                                         \
  -S /SourceCache/tensorflow-swift-models
# Build
cmake --build /BinaryCache/tensorflow-swift-models
# Test
cmake --build /BinaryCache/tensorflow-swift-models --target test

Linux:

# Configure
cmake                                     \
  -B /BinaryCache/tensorflow-swift-models \
  -D BUILD_TESTING=NO                     \
  -D CMAKE_BUILD_TYPE=Release             \
  -D CMAKE_Swift_COMPILER=$(which swiftc) \
  -G Ninja                                \
  -S /SourceCache/tensorflow-swift-models
# Build
cmake --build /BinaryCache/tensorflow-swift-models

Windows:

set DEVELOPER_LIBRARY_DIR=%SystemDrive%/Library/Developer/Platforms/Windows.platform/Developer/Library
:: Configure
"%ProgramFiles%\CMake\bin\cmake.exe"                                                                                                                                                   ^
  -B %SystemDrive%/BinaryCache/tensorflow-swift-models                                                                                                                                 ^
  -D BUILD_SHARED_LIBS=YES                                                                                                                                                             ^
  -D BUILD_TESTING=YES                                                                                                                                                                 ^
  -D CMAKE_BUILD_TYPE=Release                                                                                                                                                          ^
  -D CMAKE_Swift_COMPILER=%SystemDrive%/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe                                                        ^
  -D CMAKE_Swift_FLAGS="-sdk %SDKROOT% -I %DEVELOPER_LIBRARY_DIR%/XCTest-development/usr/lib/swift/windows/x86_64 -L %DEVELOPER_LIBRARY_DIR%/XCTest-development/usr/lib/swift/windows" ^
  -G Ninja                                                                                                                                                                             ^
  -S %SystemDrive%/SourceCache/tensorflow-swift-models
:: Build
"%ProgramFiles%\CMake\bin\cmake.exe" --build %SystemDrive%/BinaryCache/tensorflow-swift-models
:: Test
"%ProgramFiles%\CMake\bin\cmake.exe" --build %SystemDrive%/BinaryCache/tensorflow-swift-models --target test

Bugs

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

Community

Discussion about Swift for TensorFlow happens on the [email protected] 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.

swift-models's People

Contributors

bradlarson avatar texasmichelle avatar brettkoonce avatar compnerd avatar dan-zheng avatar rxwei avatar xihui-wu avatar sgugger avatar jekbradbury avatar shabalind avatar valeriyvan avatar saeta avatar shashi456 avatar xiejw avatar andr0id100 avatar rickwierenga avatar mhong avatar leoxzhao avatar mikowals avatar pschuh avatar kongzii avatar shadaj avatar mlsawyer avatar t-ae avatar rahulbhalley avatar johndpope avatar inukshukdeveloper avatar volodymyrpavliukevych avatar vojtamolda avatar vballoli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.