File tree Expand file tree Collapse file tree 5 files changed +18
-36
lines changed
Sources/PerfectTensorFlowDemo Expand file tree Collapse file tree 5 files changed +18
-36
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
- /.build
3
- /.build_lin
2
+ /.build *
4
3
/Packages
5
4
/* .xcodeproj
6
5
* .pins
7
6
* .pb
7
+ /* .resolved
8
+ /* .pins
9
+ /* .orig
10
+ /* _deploy
11
+ /.package *
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- //
2
- // Package.swift
3
- // Perfect-TensorFlow-Demo-Computer Vision
4
- //
5
- // Created by Rockford Wei on 2017-06-19.
6
- // Copyright © 2017 PerfectlySoft. All rights reserved.
7
- //
8
- //===----------------------------------------------------------------------===//
9
- //
10
- // This source file is part of the Perfect.org open source project
11
- //
12
- // Copyright (c) 2017 - 2018 PerfectlySoft Inc. and the Perfect project authors
13
- // Licensed under Apache License v2.0
14
- //
15
- // See http://perfect.org/licensing.html for license information
16
- //
17
- //===----------------------------------------------------------------------===//
18
- //
19
-
1
+ // swift-tools-version:4.0
2
+ // The swift-tools-version declares the minimum version of Swift required to build this package.
20
3
21
4
import PackageDescription
22
5
23
6
let package = Package (
24
7
name: " PerfectTensorFlowDemo " ,
25
8
dependencies: [
26
- . Package( url: " https://github.com/PerfectlySoft/Perfect-HTTPServer.git " , majorVersion: 2 ) ,
27
- . Package( url: " https://github.com/PerfectlySoft/Perfect-TensorFlow.git " , majorVersion: 1 )
9
+ . package ( url: " https://github.com/PerfectlySoft/Perfect-HTTPServer.git " , from: " 3.0.0 " ) ,
10
+ . package ( url: " https://github.com/PerfectlySoft/Perfect-TensorFlow.git " , from: " 1.4.0 " ) ,
11
+ ] ,
12
+ targets: [
13
+ . target(
14
+ name: " PerfectTensorFlowDemo " ,
15
+ dependencies: [ " PerfectHTTPServer " , " PerfectTensorFlow " ] ) ,
28
16
]
29
17
)
Original file line number Diff line number Diff line change 164
164
fModel. close ( )
165
165
try fTag. open ( . read)
166
166
let lines = try fTag. readString ( )
167
- tags = lines. utf8 . split ( separator: 10 ) . map { String ( describing: $0) }
167
+ tags = lines. split ( separator: " \n " ) . map { String ( describing: $0) }
168
168
try TF . Open ( )
169
169
inceptionModel = try LabelImage ( Data ( bytes: modelBytes) )
170
170
print ( " library ready " )
Original file line number Diff line number Diff line change 1
1
OSABR=$( echo $( uname) | tr ' [:upper:]' ' [:lower:]' )
2
- VERSION=1.3 .0
2
+ VERSION=1.4 .0
3
3
DWN=/tmp/libtensorflow.tgz
4
4
URL=https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-$OSABR -x86_64-$VERSION .tar.gz
5
5
echo $URL
6
6
wget $URL -O $DWN
7
- sudo tar xvf $DWN -C /usr/local ./lib/libtensorflow.so
7
+ tar xvf $DWN -C /usr/local ./lib/libtensorflow.so ./lib/libtensorflow_framework .so
8
8
rm -f $DWN
9
9
echo ' download AI model'
10
10
wget https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -O /tmp/in.zip
You can’t perform that action at this time.
0 commit comments