diff --git a/.gitignore b/.gitignore index 8615121..db75dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,13 @@ DerivedData *.ipa *.xcuserstate +# SwiftPackageManager +# +.build +/*.xcodeproj/xcshareddata/ +/*.xcodeproj/project.xcworkspace/xcuserdata/ +/*.xcodeproj/xcuserdata/ + # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However diff --git a/MNIST/AppDelegate.swift b/MNIST/AppDelegate.swift index f70ff9a..ecede7f 100644 --- a/MNIST/AppDelegate.swift +++ b/MNIST/AppDelegate.swift @@ -6,30 +6,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/MNIST/Canvas.swift b/MNIST/Canvas.swift index 064975c..51f20a5 100644 --- a/MNIST/Canvas.swift +++ b/MNIST/Canvas.swift @@ -3,11 +3,11 @@ import CoreGraphics struct Canvas { var lines: [Line] = [Line()] - mutating func draw(point: CGPoint) { + mutating func draw(_ point: CGPoint) { lines[lines.endIndex - 1].points.append(point) } mutating func newLine() { lines.append(Line()) } -} \ No newline at end of file +} diff --git a/MNIST/CanvasView.swift b/MNIST/CanvasView.swift index 79d2a4b..b3040c0 100644 --- a/MNIST/CanvasView.swift +++ b/MNIST/CanvasView.swift @@ -12,33 +12,33 @@ class CanvasView: UIView { var image: UIImage { UIGraphicsBeginImageContext(bounds.size) - layer.renderInContext(UIGraphicsGetCurrentContext()!) + layer.render(in: UIGraphicsGetCurrentContext()!) let result = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() - return result + return result! } - override func drawRect(rect: CGRect) { + override func draw(_ rect: CGRect) { let context = UIGraphicsGetCurrentContext() for line in canvas.lines { - CGContextSetLineWidth(context, 20.0) - CGContextSetStrokeColorWithColor(context, UIColor(colorLiteralRed: 0.0, green: 0.0, blue: 0.0, alpha: 1.0).CGColor) - CGContextSetLineCap(context, .Round) - CGContextSetLineJoin(context, .Round) - for (index, point) in line.points.enumerate() { + context?.setLineWidth(20.0) + context?.setStrokeColor(UIColor(colorLiteralRed: 0.0, green: 0.0, blue: 0.0, alpha: 1.0).cgColor) + context?.setLineCap(.round) + context?.setLineJoin(.round) + for (index, point) in line.points.enumerated() { if index == 0 { - CGContextMoveToPoint(context, point.x, point.y) + context?.move(to: CGPoint(x: point.x, y: point.y)) } else { - CGContextAddLineToPoint(context, point.x, point.y) + context?.addLine(to: CGPoint(x: point.x, y: point.y)) } } } - CGContextStrokePath(context) + context?.strokePath() } - func onPanGesture(gestureRecognizer: UIPanGestureRecognizer) { - canvas.draw(gestureRecognizer.locationInView(self)) - if gestureRecognizer.state == .Ended { + func onPanGesture(_ gestureRecognizer: UIPanGestureRecognizer) { + canvas.draw(gestureRecognizer.location(in: self)) + if gestureRecognizer.state == .ended { canvas.newLine() } @@ -49,4 +49,4 @@ class CanvasView: UIView { canvas = Canvas() setNeedsDisplay() } -} \ No newline at end of file +} diff --git a/MNIST/Classifier.swift b/MNIST/Classifier.swift index a966ec6..e6ed24c 100644 --- a/MNIST/Classifier.swift +++ b/MNIST/Classifier.swift @@ -11,36 +11,36 @@ public struct Classifier { public let W_fc2: Tensor public let b_fc2: Tensor - public func classify(x_image: Tensor) -> Int { - let h_conv1 = (x_image.conv2d(filter: W_conv1, strides: [1, 1, 1]) + b_conv1).relu + public func classify(_ x_image: Tensor) -> Int { + let h_conv1 = (x_image.conv2d(filter: W_conv1, strides: [1, 1, 1]) + b_conv1).relu() let h_pool1 = h_conv1.maxPool(kernelSize: [2, 2, 1], strides: [2, 2, 1]) - let h_conv2 = (h_pool1.conv2d(filter: W_conv2, strides: [1, 1, 1]) + b_conv2).relu + let h_conv2 = (h_pool1.conv2d(filter: W_conv2, strides: [1, 1, 1]) + b_conv2).relu() let h_pool2 = h_conv2.maxPool(kernelSize: [2, 2, 1], strides: [2, 2, 1]) - let h_pool2_flat = h_pool2.reshape([1, 7 * 7 * 64]) - let h_fc1 = (h_pool2_flat.matmul(W_fc1) + b_fc1).relu + let h_pool2_flat = h_pool2.reshaped([1, 7 * 7 * 64]) + let h_fc1 = (h_pool2_flat.matmul(W_fc1) + b_fc1).relu() - let y_conv = (h_fc1.matmul(W_fc2) + b_fc2).softmax + let y_conv = (h_fc1.matmul(W_fc2) + b_fc2).softmax() - return y_conv.elements.enumerate().maxElement { $0.1 < $1.1 }!.0 + return y_conv.elements.enumerated().max { $0.1 < $1.1 }!.0 } } extension Classifier { public init(path: String) { - W_conv1 = Tensor(shape: [5, 5, 1, 32], elements: loadFloatArray(directory: path, file: "W_conv1")) - b_conv1 = Tensor(shape: [32], elements: loadFloatArray(directory: path, file: "b_conv1")) - W_conv2 = Tensor(shape: [5, 5, 32, 64], elements: loadFloatArray(directory: path, file: "W_conv2")) - b_conv2 = Tensor(shape: [64], elements: loadFloatArray(directory: path, file: "b_conv2")) - W_fc1 = Tensor(shape: [7 * 7 * 64, 1024], elements: loadFloatArray(directory: path, file: "W_fc1")) - b_fc1 = Tensor(shape: [1024], elements: loadFloatArray(directory: path, file: "b_fc1")) - W_fc2 = Tensor(shape: [1024, 10], elements: loadFloatArray(directory: path, file: "W_fc2")) - b_fc2 = Tensor(shape: [10], elements: loadFloatArray(directory: path, file: "b_fc2")) + W_conv1 = Tensor(shape: [5, 5, 1, 32], elements: loadFloatArray(path, file: "W_conv1")) + b_conv1 = Tensor(shape: [32], elements: loadFloatArray(path, file: "b_conv1")) + W_conv2 = Tensor(shape: [5, 5, 32, 64], elements: loadFloatArray(path, file: "W_conv2")) + b_conv2 = Tensor(shape: [64], elements: loadFloatArray(path, file: "b_conv2")) + W_fc1 = Tensor(shape: [7 * 7 * 64, 1024], elements: loadFloatArray(path, file: "W_fc1")) + b_fc1 = Tensor(shape: [1024], elements: loadFloatArray(path, file: "b_fc1")) + W_fc2 = Tensor(shape: [1024, 10], elements: loadFloatArray(path, file: "W_fc2")) + b_fc2 = Tensor(shape: [10], elements: loadFloatArray(path, file: "b_fc2")) } } -private func loadFloatArray(directory directory: String, file: String) -> [Float] { - let data = NSData(contentsOfFile: directory.stringByAppendingPathComponent(file))! - return Array(UnsafeBufferPointer(start: UnsafeMutablePointer(data.bytes), count: data.length / 4)) +private func loadFloatArray(_ directory: String, file: String) -> [Float] { + let data = try! Data(contentsOf: URL(fileURLWithPath: directory.stringByAppendingPathComponent(file))) + return Array(UnsafeBufferPointer(start: UnsafeMutablePointer(mutating: (data as NSData).bytes.bindMemory(to: Float.self, capacity: data.count)), count: data.count / 4)) } diff --git a/MNIST/Info.plist b/MNIST/Info.plist index 40a5271..8aed6ca 100644 --- a/MNIST/Info.plist +++ b/MNIST/Info.plist @@ -2,16 +2,6 @@ - NSAppTransportSecurity - - NSExceptionDomains - - yann.lecun.com - - - NSAllowsArbitraryLoads - - CFBundleDevelopmentRegion en CFBundleExecutable @@ -26,8 +16,6 @@ APPL CFBundleShortVersionString 1.0 - CFBundleSignature - ???? CFBundleVersion 1 LSRequiresIPhoneOS @@ -53,5 +41,15 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + NSAppTransportSecurity + + NSExceptionDomains + + yann.lecun.com + + + NSAllowsArbitraryLoads + + diff --git a/MNIST/String.swift b/MNIST/String.swift index f255dc2..309c9aa 100644 --- a/MNIST/String.swift +++ b/MNIST/String.swift @@ -1,7 +1,7 @@ import Foundation extension String { - public func stringByAppendingPathComponent(str: String) -> String { - return (self as NSString).stringByAppendingPathComponent(str) + public func stringByAppendingPathComponent(_ str: String) -> String { + return (self as NSString).appendingPathComponent(str) } -} \ No newline at end of file +} diff --git a/MNIST/ViewController.swift b/MNIST/ViewController.swift index 149f83c..dc63422 100644 --- a/MNIST/ViewController.swift +++ b/MNIST/ViewController.swift @@ -5,31 +5,31 @@ class ViewController: UIViewController { @IBOutlet private var canvasView: CanvasView! private let inputSize = 28 - private let classifier = Classifier(path: NSBundle.mainBundle().resourcePath!) + private let classifier = Classifier(path: Bundle.main.resourcePath!) - @IBAction func onPressClassifyButton(sender: UIButton) { + @IBAction func onPressClassifyButton(_ sender: UIButton) { let input: Tensor do { let image = canvasView.image - let cgImage = image.CGImage! + let cgImage = image.cgImage! - var pixels = [UInt8](count: inputSize * inputSize, repeatedValue: 0) + var pixels = [UInt8](repeating: 0, count: inputSize * inputSize) - let context = CGBitmapContextCreate(&pixels, inputSize, inputSize, 8, inputSize, CGColorSpaceCreateDeviceGray()!, CGBitmapInfo.ByteOrderDefault.rawValue)! - CGContextClearRect(context, CGRect(x: 0.0, y: 0.0, width: CGFloat(inputSize), height: CGFloat(inputSize))) + let context = CGContext(data: &pixels, width: inputSize, height: inputSize, bitsPerComponent: 8, bytesPerRow: inputSize, space: CGColorSpaceCreateDeviceGray(), bitmapInfo: 0)! + context.clear(CGRect(x: 0.0, y: 0.0, width: CGFloat(inputSize), height: CGFloat(inputSize))) let rect = CGRect(x: 0.0, y: 0.0, width: CGFloat(inputSize), height: CGFloat(inputSize)) - CGContextDrawImage(context, rect, cgImage) + context.draw(cgImage, in: rect) input = Tensor(shape: [Dimension(inputSize), Dimension(inputSize), 1], elements: pixels.map { -(Float($0) / 255.0 - 0.5) + 0.5 }) } let estimatedLabel = classifier.classify(input) - let alertController = UIAlertController(title: "\(estimatedLabel)", message: nil, preferredStyle: .Alert) - alertController.addAction(UIAlertAction(title: "Dismiss", style: .Default) { _ in self.canvasView.clear() }) - presentViewController(alertController, animated: true, completion: nil) + let alertController = UIAlertController(title: "\(estimatedLabel)", message: nil, preferredStyle: .alert) + alertController.addAction(UIAlertAction(title: "Dismiss", style: .default) { _ in self.canvasView.clear() }) + present(alertController, animated: true, completion: nil) } } diff --git a/MNISTTests/Array.swift b/MNISTTests/Array.swift index e519774..166d8a5 100644 --- a/MNISTTests/Array.swift +++ b/MNISTTests/Array.swift @@ -1,5 +1,5 @@ extension Array { - func grouped(count: Int) -> [[Element]] { + func grouped(_ count: Int) -> [[Element]] { var result: [[Element]] = [] var group: [Element] = [] for element in self { @@ -11,4 +11,4 @@ extension Array { } return result } -} \ No newline at end of file +} diff --git a/MNISTTests/ClassifierTest.swift b/MNISTTests/ClassifierTest.swift deleted file mode 100644 index 5bb3e96..0000000 --- a/MNISTTests/ClassifierTest.swift +++ /dev/null @@ -1,17 +0,0 @@ -import XCTest -import TensorSwift -import MNIST - -class ClassifierTest: XCTestCase { - func testClassify() { - let classifier = Classifier(path: NSBundle(forClass: ClassifierTest.self).resourcePath!) - let (images, labels) = downloadTestData() - - let xArray: [[Float]] = [UInt8](UnsafeBufferPointer(start: UnsafePointer(images.bytes + 16), count: 28 * 28 * 10000)).map { Float($0) / 255.0 }.grouped(28 * 28) - let yArray: [Int] = [UInt8](UnsafeBufferPointer(start: UnsafePointer(labels.bytes + 8), count: 10000)).map { Int($0) } - - let accuracy = Float(zip(xArray, yArray).reduce(0) { $0 + (classifier.classify(Tensor(shape: [28, 28, 1], elements: $1.0)) == $1.1 ? 1 : 0) }) / Float(yArray.count) - - XCTAssertGreaterThan(accuracy, 0.99) - } -} \ No newline at end of file diff --git a/MNISTTests/ClassifierTests.swift b/MNISTTests/ClassifierTests.swift new file mode 100644 index 0000000..aed32fd --- /dev/null +++ b/MNISTTests/ClassifierTests.swift @@ -0,0 +1,32 @@ +import XCTest +import TensorSwift +@testable import MNIST + +class ClassifierTests: XCTestCase { + func testClassify() { + + let classifier = Classifier(path: Bundle(for: ViewController.self).resourcePath!) + let (images, labels) = downloadTestData() + + let count = 1000 + + let xArray: [[Float]] = images.withUnsafeBytes { ptr in + [UInt8](UnsafeBufferPointer(start: UnsafePointer(ptr + 16), count: 28 * 28 * count)) + .map { Float($0) / 255.0 } + .grouped(28 * 28) + } + + let yArray: [Int] = labels.withUnsafeBytes { ptr in + [UInt8](UnsafeBufferPointer(start: UnsafePointer(ptr + 8), count: count)) + .map { Int($0) } + } + + let accuracy = Float(zip(xArray, yArray) + .reduce(0) { $0 + (classifier.classify(Tensor(shape: [28, 28, 1], elements: $1.0)) == $1.1 ? 1 : 0) }) + / Float(yArray.count) + + print("accuracy: \(accuracy)") + + XCTAssertGreaterThan(accuracy, 0.97) + } +} diff --git a/MNISTTests/Downloader.swift b/MNISTTests/Downloader.swift index e685429..b2d9f7d 100644 --- a/MNISTTests/Downloader.swift +++ b/MNISTTests/Downloader.swift @@ -1,22 +1,26 @@ import Foundation -import zlib -func downloadTestData() -> (images: NSData, labels: NSData) { +func downloadTestData() -> (images: Data, labels: Data) { let baseUrl = "http://yann.lecun.com/exdb/mnist/" - let testImages = NSData(contentsOfURL: NSURL(string: baseUrl)!.URLByAppendingPathComponent("t10k-images-idx3-ubyte.gz"))! - let testLabels = NSData(contentsOfURL: NSURL(string: baseUrl)!.URLByAppendingPathComponent("t10k-labels-idx1-ubyte.gz"))! + var testImagesUrl = URL(string: baseUrl)!.appendingPathComponent("t10k-images-idx3-ubyte.gz") + var testLabelsUrl = URL(string: baseUrl)!.appendingPathComponent("t10k-labels-idx1-ubyte.gz") + + print("download: \(testImagesUrl)") + let testImages = try! Data(contentsOf: testImagesUrl) + print("download: \(testLabelsUrl)") + let testLabels = try! Data(contentsOf: testLabelsUrl) return (images: ungzip(testImages)!, labels: ungzip(testLabels)!) } -private func ungzip(source: NSData) -> NSData? { - guard source.length > 0 else { +private func ungzip(_ source: Data) -> Data? { + guard source.count > 0 else { return nil } - var stream: z_stream = z_stream.init(next_in: UnsafeMutablePointer(source.bytes), avail_in: uint(source.length), total_in: 0, next_out: nil, avail_out: 0, total_out: 0, msg: nil, state: nil, zalloc: nil, zfree: nil, opaque: nil, data_type: 0, adler: 0, reserved: 0) - guard inflateInit2_(&stream, MAX_WBITS + 32, ZLIB_VERSION, Int32(sizeof(z_stream))) == Z_OK else { + var stream: z_stream = z_stream.init(next_in: UnsafeMutablePointer(mutating: (source as NSData).bytes.bindMemory(to: Bytef.self, capacity: source.count)), avail_in: uint(source.count), total_in: 0, next_out: nil, avail_out: 0, total_out: 0, msg: nil, state: nil, zalloc: nil, zfree: nil, opaque: nil, data_type: 0, adler: 0, reserved: 0) + guard inflateInit2_(&stream, MAX_WBITS + 32, ZLIB_VERSION, Int32(MemoryLayout.size)) == Z_OK else { return nil } @@ -24,17 +28,17 @@ private func ungzip(source: NSData) -> NSData? { while stream.avail_out == 0 { let bufferSize = 0x10000 - let buffer: UnsafeMutablePointer = UnsafeMutablePointer.alloc(bufferSize) + let buffer: UnsafeMutablePointer = UnsafeMutablePointer.allocate(capacity: bufferSize) stream.next_out = buffer - stream.avail_out = uint(sizeofValue(buffer)) + stream.avail_out = uint(MemoryLayout.size(ofValue: buffer)) inflate(&stream, Z_FINISH) - let length: size_t = sizeofValue(buffer) - Int(stream.avail_out) + let length: size_t = MemoryLayout.size(ofValue: buffer) - Int(stream.avail_out) if length > 0 { - data.appendBytes(buffer, length: length) + data.append(buffer, length: length) } - buffer.dealloc(bufferSize) + buffer.deallocate(capacity: bufferSize) } inflateEnd(&stream) - return NSData(data: data) -} \ No newline at end of file + return (NSData(data: data as Data) as Data) +} diff --git a/MNISTTests/DownloaderTest.swift b/MNISTTests/DownloaderTests.swift similarity index 68% rename from MNISTTests/DownloaderTest.swift rename to MNISTTests/DownloaderTests.swift index 8cbfa69..56eaf4b 100644 --- a/MNISTTests/DownloaderTest.swift +++ b/MNISTTests/DownloaderTests.swift @@ -1,10 +1,10 @@ import XCTest -class Downloader: XCTestCase { +class DownloaderTests: XCTestCase { func testDownloadTestData() { let testData = downloadTestData() - XCTAssertEqual(testData.images.length, 7840016) + XCTAssertEqual(testData.images.count, 7840016) XCTAssertEqual(testData.images.sha1, "65e11ec1fd220343092a5070b58418b5c2644e26") } } diff --git a/MNISTTests/Header.h b/MNISTTests/Header.h deleted file mode 100644 index 0ff2766..0000000 --- a/MNISTTests/Header.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// Header.h -// TensorSwift -// -// Created by 松下日昇 on 2016/04/05. -// Copyright © 2016年 Qoncept, Inc. All rights reserved. -// - -#ifndef Header_h -#define Header_h - - -#endif /* Header_h */ diff --git a/MNISTTests/Info.plist b/MNISTTests/Info.plist index 8b954c3..a0c1b32 100644 --- a/MNISTTests/Info.plist +++ b/MNISTTests/Info.plist @@ -26,8 +26,6 @@ BNDL CFBundleShortVersionString 1.0 - CFBundleSignature - ???? CFBundleVersion 1 diff --git a/MNISTTests/MNISTTest.swift b/MNISTTests/MNISTTest.swift deleted file mode 100644 index 38276e9..0000000 --- a/MNISTTests/MNISTTest.swift +++ /dev/null @@ -1,5 +0,0 @@ -import XCTest -import MNIST - -class MNISTTest: XCTestCase { -} diff --git a/MNISTTests/MNISTTests-Bridging-Header.h b/MNISTTests/MNISTTests-Bridging-Header.h index 5b7bcec..a762601 100644 --- a/MNISTTests/MNISTTests-Bridging-Header.h +++ b/MNISTTests/MNISTTests-Bridging-Header.h @@ -2,5 +2,6 @@ #define MNISTTests_Bridging_Header_h #import +#import "zlib.h" #endif /* MNISTTests_Bridging_Header_h */ diff --git a/MNISTTests/MNISTTests.swift b/MNISTTests/MNISTTests.swift new file mode 100644 index 0000000..860d337 --- /dev/null +++ b/MNISTTests/MNISTTests.swift @@ -0,0 +1,16 @@ +import XCTest +@testable import MNIST + +class MNISTTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + +} diff --git a/MNISTTests/SHA1.swift b/MNISTTests/SHA1.swift index c50104f..5b173cb 100644 --- a/MNISTTests/SHA1.swift +++ b/MNISTTests/SHA1.swift @@ -1,11 +1,11 @@ import Foundation -extension NSData { +extension Data { var sha1: String { let data = self - var digest = [UInt8](count:Int(CC_SHA1_DIGEST_LENGTH), repeatedValue: 0) - CC_SHA1(data.bytes, CC_LONG(data.length), &digest) + var digest = [UInt8](repeating: 0, count: Int(CC_SHA1_DIGEST_LENGTH)) + CC_SHA1((data as NSData).bytes, CC_LONG(data.count), &digest) let hexBytes = digest.map { String(format: "%02hhx", $0) } - return hexBytes.joinWithSeparator("") + return hexBytes.joined(separator: "") } } diff --git a/MNISTUITests/Info.plist b/MNISTUITests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/MNISTUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/MNISTUITests/MNISTUITests.swift b/MNISTUITests/MNISTUITests.swift new file mode 100644 index 0000000..25c2ef8 --- /dev/null +++ b/MNISTUITests/MNISTUITests.swift @@ -0,0 +1,36 @@ +// +// MNISTUITests.swift +// MNISTUITests +// +// Created by Araki Takehiro on 2016/10/01. +// +// + +import XCTest + +class MNISTUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..be3ad23 --- /dev/null +++ b/Package.swift @@ -0,0 +1,5 @@ +import PackageDescription + +let package = Package( + name: "TensorSwift" +) diff --git a/README.md b/README.md index bec0dab..724dada 100644 --- a/README.md +++ b/README.md @@ -33,34 +33,41 @@ public struct Classifier { public let b_fc2: Tensor public func classify(x_image: Tensor) -> Int { - let h_conv1 = (x_image.conv2d(filter: W_conv1, strides: [1, 1, 1]) + b_conv1).relu + let h_conv1 = (x_image.conv2d(filter: W_conv1, strides: [1, 1, 1]) + b_conv1).relu() let h_pool1 = h_conv1.maxPool(kernelSize: [2, 2, 1], strides: [2, 2, 1]) - - let h_conv2 = (h_pool1.conv2d(filter: W_conv2, strides: [1, 1, 1]) + b_conv2).relu + + let h_conv2 = (h_pool1.conv2d(filter: W_conv2, strides: [1, 1, 1]) + b_conv2).relu() let h_pool2 = h_conv2.maxPool(kernelSize: [2, 2, 1], strides: [2, 2, 1]) + + let h_pool2_flat = h_pool2.reshaped([1, 7 * 7 * 64]) + let h_fc1 = (h_pool2_flat.matmul(W_fc1) + b_fc1).relu() + + let y_conv = (h_fc1.matmul(W_fc2) + b_fc2).softmax() - let h_pool2_flat = h_pool2.reshape([1, 7 * 7 * 64]) - let h_fc1 = (h_pool2_flat.matmul(W_fc1) + b_fc1).relu - - let y_conv = (h_fc1.matmul(W_fc2) + b_fc2).softmax - - return y_conv.elements.enumerate().maxElement { $0.1 < $1.1 }!.0 + return y_conv.elements.enumerated().max { $0.1 < $1.1 }!.0 } } ``` ## Installation +### Swift Package Manager + +``` +.Package(url: "git@github.com:qoncept/TensorSwift.git", + Version(0, 2, 0)), +``` + ### CocoaPods ``` -pod 'TensorSwift', '~> 0.1' +pod 'TensorSwift', '~> 0.2' ``` ### Carthage ``` -github "qoncept/TensorSwift" ~> 0.1 +github "qoncept/TensorSwift" ~> 0.2 ``` ## License diff --git a/TensorSwift/Dimension.swift b/Sources/Dimension.swift similarity index 95% rename from TensorSwift/Dimension.swift rename to Sources/Dimension.swift index e2320e6..9910221 100644 --- a/TensorSwift/Dimension.swift +++ b/Sources/Dimension.swift @@ -7,7 +7,7 @@ public struct Dimension { } } -extension Dimension: IntegerLiteralConvertible { +extension Dimension: ExpressibleByIntegerLiteral { public init(integerLiteral value: Int) { self.init(value) } diff --git a/TensorSwift/Info.plist b/Sources/Info.plist similarity index 100% rename from TensorSwift/Info.plist rename to Sources/Info.plist diff --git a/Sources/Operators.swift b/Sources/Operators.swift new file mode 100644 index 0000000..106438e --- /dev/null +++ b/Sources/Operators.swift @@ -0,0 +1,5 @@ +infix operator ** : PowerPrecedence +precedencegroup PowerPrecedence { + associativity: right + higherThan: MultiplicationPrecedence +} diff --git a/TensorSwift/Shape.swift b/Sources/Shape.swift similarity index 87% rename from TensorSwift/Shape.swift rename to Sources/Shape.swift index 466cbec..6621a6f 100644 --- a/TensorSwift/Shape.swift +++ b/Sources/Shape.swift @@ -1,7 +1,7 @@ public struct Shape { public let dimensions: [Dimension] - public var volume: Int { + public func volume() -> Int { return dimensions.reduce(1) { $0 * $1.value } } @@ -10,7 +10,7 @@ public struct Shape { } } -extension Shape: ArrayLiteralConvertible { +extension Shape: ExpressibleByArrayLiteral { public init(arrayLiteral elements: Dimension...) { self.init(elements) } diff --git a/TensorSwift/Tensor.swift b/Sources/Tensor.swift similarity index 87% rename from TensorSwift/Tensor.swift rename to Sources/Tensor.swift index 191087b..d924deb 100644 --- a/TensorSwift/Tensor.swift +++ b/Sources/Tensor.swift @@ -7,11 +7,11 @@ public struct Tensor { public typealias Element = Float public let shape: Shape - public private(set) var elements: [Element] + public fileprivate(set) var elements: [Element] public init(shape: Shape, elements: [Element]) { - let volume = shape.volume - precondition(elements.count >= volume, "`elements.count` must be greater than or equal to `shape.volume`: elements.count = \(elements.count), shape.volume = \(shape.volume)") + let volume = shape.volume() + precondition(elements.count >= volume, "`elements.count` must be greater than or equal to `shape.volume`: elements.count = \(elements.count), shape.volume = \(shape.volume())") self.shape = shape self.elements = (elements.count == volume) ? elements : Array(elements[0.. Tensor { + public mutating func reshape(_ shape: Shape) { + self = reshaped(shape) + } + + public func reshaped(_ shape: Shape) -> Tensor { return Tensor(shape: shape, elements: elements) } } extension Tensor { // like CollentionType - internal func index(indices: [Int]) -> Int { + internal func index(_ indices: [Int]) -> Int { assert(indices.count == shape.dimensions.count, "`indices.count` must be \(shape.dimensions.count): \(indices.count)") return zip(shape.dimensions, indices).reduce(0) { assert(0 <= $1.1 && $1.1 < $1.0.value, "Illegal index: indices = \(indices), shape = \(shape)") @@ -47,14 +51,14 @@ extension Tensor { // like CollentionType } } - public var volume: Int { - return shape.volume + public func volume() -> Int { + return shape.volume() } } -extension Tensor: SequenceType { - public func generate() -> IndexingGenerator<[Element]> { - return elements.generate() +extension Tensor: Sequence { + public func makeIterator() -> IndexingIterator<[Element]> { + return elements.makeIterator() } } @@ -63,7 +67,7 @@ public func ==(lhs: Tensor, rhs: Tensor) -> Bool { return lhs.shape == rhs.shape && lhs.elements == rhs.elements } -internal func commutativeBinaryOperation(lhs: Tensor, _ rhs: Tensor, operation: (Float, Float) -> Float) -> Tensor { +internal func commutativeBinaryOperation(_ lhs: Tensor, _ rhs: Tensor, operation: (Float, Float) -> Float) -> Tensor { let lSize = lhs.shape.dimensions.count let rSize = rhs.shape.dimensions.count @@ -86,7 +90,7 @@ internal func commutativeBinaryOperation(lhs: Tensor, _ rhs: Tensor, operation: return Tensor(shape: a.shape, elements: zipMapRepeat(a.elements, b.elements, operation: operation)) } -internal func noncommutativeBinaryOperation(lhs: Tensor, _ rhs: Tensor, operation: (Float, Float) -> Float) -> Tensor { +internal func noncommutativeBinaryOperation(_ lhs: Tensor, _ rhs: Tensor, operation: (Float, Float) -> Float) -> Tensor { let lSize = lhs.shape.dimensions.count let rSize = rhs.shape.dimensions.count @@ -135,7 +139,7 @@ public func /(lhs: Float, rhs: Tensor) -> Tensor { } extension Tensor { // Matrix - public func matmul(tensor: Tensor) -> Tensor { + public func matmul(_ tensor: Tensor) -> Tensor { precondition(shape.dimensions.count == 2, "This tensor is not a matrix: shape = \(shape)") precondition(tensor.shape.dimensions.count == 2, "The given tensor is not a matrix: shape = \(tensor.shape)") precondition(tensor.shape.dimensions[0] == shape.dimensions[1], "Incompatible shapes of matrices: self.shape = \(shape), tensor.shape = \(tensor.shape)") @@ -158,7 +162,7 @@ extension Tensor { // Matrix tensor.elements, // B n, // ldb 1.0, // beta - UnsafeMutablePointer(result.elements), // C + UnsafeMutablePointer(mutating: result.elements), // C n // ldc ) diff --git a/TensorSwift/TensorMath.swift b/Sources/TensorMath.swift similarity index 75% rename from TensorSwift/TensorMath.swift rename to Sources/TensorMath.swift index 5842005..018c0c5 100644 --- a/TensorSwift/TensorMath.swift +++ b/Sources/TensorMath.swift @@ -13,61 +13,61 @@ public func **(lhs: Tensor.Element, rhs: Tensor) -> Tensor { } extension Tensor { - public var sin: Tensor { + public func sin() -> Tensor { return Tensor(shape: shape, elements: elements.map(sinf)) } - public var cos: Tensor { + public func cos() -> Tensor { return Tensor(shape: shape, elements: elements.map(cosf)) } - public var tan: Tensor { + public func tan() -> Tensor { return Tensor(shape: shape, elements: elements.map(tanf)) } - public var asin: Tensor { + public func asin() -> Tensor { return Tensor(shape: shape, elements: elements.map(asinf)) } - public var acos: Tensor { + public func acos() -> Tensor { return Tensor(shape: shape, elements: elements.map(acosf)) } - public var atan: Tensor { + public func atan() -> Tensor { return Tensor(shape: shape, elements: elements.map(atanf)) } - public var sinh: Tensor { + public func sinh() -> Tensor { return Tensor(shape: shape, elements: elements.map(sinhf)) } - public var cosh: Tensor { + public func cosh() -> Tensor { return Tensor(shape: shape, elements: elements.map(coshf)) } - public var tanh: Tensor { + public func tanh() -> Tensor { return Tensor(shape: shape, elements: elements.map(tanhf)) } - public var exp: Tensor { + public func exp() -> Tensor { return Tensor(shape: shape, elements: elements.map(expf)) } - public var log: Tensor { + public func log() -> Tensor { return Tensor(shape: shape, elements: elements.map(logf)) } - public var sqrt: Tensor { + public func sqrt() -> Tensor { return Tensor(shape: shape, elements: elements.map(sqrtf)) } - public var cbrt: Tensor { + public func cbrt() -> Tensor { return Tensor(shape: shape, elements: elements.map(cbrtf)) } } extension Tensor { - public var sigmoid: Tensor { + public func sigmoid() -> Tensor { return Tensor(shape: shape, elements: elements.map { 1.0 / expf(-$0) }) } -} \ No newline at end of file +} diff --git a/TensorSwift/TensorNN.swift b/Sources/TensorNN.swift similarity index 82% rename from TensorSwift/TensorNN.swift rename to Sources/TensorNN.swift index 1579d11..1bc73f3 100644 --- a/TensorSwift/TensorNN.swift +++ b/Sources/TensorNN.swift @@ -4,19 +4,19 @@ import Accelerate #endif extension Tensor { - public var softmax: Tensor { - let exps = exp - let sum = exps.elements.reduce(0.0, combine: +) + public func softmax() -> Tensor { + let exps = exp() + let sum = exps.elements.reduce(0.0, +) return exps / sum } - public var relu: Tensor { + public func relu() -> Tensor { return Tensor(shape: shape, elements: elements.map { fmax($0, 0.0) }) } } extension Tensor { - public func maxPool(kernelSize kernelSize: [Int], strides: [Int]) -> Tensor { // padding = Same + public func maxPool(kernelSize: [Int], strides: [Int]) -> Tensor { // padding = Same precondition(shape.dimensions.count == 3, "`shape.dimensions.count` must be 3: \(shape.dimensions.count)") precondition(kernelSize.count == 3, "`ksize.count` must be 3: \(kernelSize.count)") precondition(kernelSize[2] == 1, "`ksize[3]` != 1 is not supported: \(kernelSize[2])") @@ -42,25 +42,25 @@ extension Tensor { let outCols = shape.dimensions[1].value.ceilDiv(colStride) // Initialize with -infinity for maximization. - let elements = [Element](count: outCols * outRows * numChannels, repeatedValue: -Float.infinity) + let elements = [Element](repeating: -Float.infinity, count: outCols * outRows * numChannels) for y in 0..(self.elements) + (inY * inCols + inMinX) * numChannels + var inPointer = UnsafeMutablePointer(mutating: self.elements) + (inY * inCols + inMinX) * numChannels for _ in inMinX...inMaxX { - var outPointer = UnsafeMutablePointer(elements) + outPixelIndex * numChannels + var outPointer = UnsafeMutablePointer(mutating: elements) + outPixelIndex * numChannels for _ in 0.. Tensor { // padding = Same + public func conv2d(filter: Tensor, strides: [Int]) -> Tensor { // padding = Same let inChannels = filter.shape.dimensions[2].value precondition(shape.dimensions.count == 3, "`shape.dimensions.count` must be 3: \(shape.dimensions.count)") @@ -106,22 +106,22 @@ extension Tensor { // a.shape == [outRows * outCols, rowSize] let rowSize = filterHeight * filterWidth * inChannels - let a = [Float](count: outRows * outCols * rowSize, repeatedValue: 0) + let a = [Float](repeating: 0, count: outRows * outCols * rowSize) for y in 0..(a) + ((y * outCols + x) * filterHeight - min(inY0 + inMinDy, 0)) * filterWidth * inChannels + var dest = UnsafeMutablePointer(mutating: a) + ((y * outCols + x) * filterHeight - Swift.min(inY0 + inMinDy, 0)) * filterWidth * inChannels var src = elementsPointer + (inMinY * inCols + inMinX) * inChannels for _ in inMinY...inMaxY { - memcpy(dest - min(inMinX + inMinDx, 0) * inChannels, src, (inMinX...inMaxX).count * inChannels * sizeof(Float)) + memcpy(dest - Swift.min(inMinX + inMinDx, 0) * inChannels, src, (inMinX...inMaxX).count * inChannels * MemoryLayout.size) dest += filterWidth * inChannels src += inCols * inChannels } @@ -147,7 +147,7 @@ extension Tensor { UnsafePointer(filter.elements), // B n, // ldb 1.0, // beta - UnsafeMutablePointer(result.elements), // C + UnsafeMutablePointer(mutating: result.elements), // C n // ldc ) @@ -200,4 +200,4 @@ extension Tensor { v += 1 } } -#endif \ No newline at end of file +#endif diff --git a/TensorSwift/TensorSwift.h b/Sources/TensorSwift.h similarity index 100% rename from TensorSwift/TensorSwift.h rename to Sources/TensorSwift.h diff --git a/TensorSwift/Utils.swift b/Sources/Utils.swift similarity index 59% rename from TensorSwift/Utils.swift rename to Sources/Utils.swift index dcbad7a..78f680d 100644 --- a/TensorSwift/Utils.swift +++ b/Sources/Utils.swift @@ -1,15 +1,15 @@ extension Int { - internal func ceilDiv(rhs: Int) -> Int { + internal func ceilDiv(_ rhs: Int) -> Int { return (self + rhs - 1) / rhs } } -internal func hasSuffix(array array: [Element], suffix: [Element]) -> Bool { +internal func hasSuffix(array: [Element], suffix: [Element]) -> Bool { guard array.count >= suffix.count else { return false } return zip(array[(array.count - suffix.count).. Float) -> [Float] { +internal func zipMap(_ a: [Float], _ b: [Float], operation: (Float, Float) -> Float) -> [Float] { var result: [Float] = [] for i in a.indices { result.append(operation(a[i], b[i])) @@ -17,7 +17,7 @@ internal func zipMap(a: [Float], _ b: [Float], operation: (Float, Float) -> Floa return result } -internal func zipMapRepeat(a: [Float], _ infiniteB: [Float], operation: (Float, Float) -> Float) -> [Float] { +internal func zipMapRepeat(_ a: [Float], _ infiniteB: [Float], operation: (Float, Float) -> Float) -> [Float] { var result: [Float] = [] for i in a.indices { result.append(operation(a[i], infiniteB[i % infiniteB.count])) diff --git a/TensorSwift.podspec b/TensorSwift.podspec index 99b1d6a..448bb8f 100644 --- a/TensorSwift.podspec +++ b/TensorSwift.podspec @@ -1,15 +1,15 @@ Pod::Spec.new do |s| s.name = "TensorSwift" - s.version = "0.1.0" + s.version = "0.2.0" s.summary = "TensorSwift is a lightweight library to calculate tensors, which has similar APIs to TensorFlow's." s.homepage = "https://github.com/qoncept/TensorSwift" s.license = { :type => "MIT", :file => "LICENSE" } - s.authors = { "Yuta Koshizawa" => "koshizawa@qoncept.co.jp", "Araki Takehiro" => "araki@qoncept.co.jp" } + s.authors = { "Yuta Koshizawa" => "koshizawa@qoncept.co.jp", "Takehiro Araki" => "araki@qoncept.co.jp" } s.ios.deployment_target = "8.0" s.osx.deployment_target = "10.9" # s.watchos.deployment_target = "2.0" # s.tvos.deployment_target = "9.0" s.source = { :git => "https://github.com/qoncept/TensorSwift.git", :tag => "#{s.version}" } - s.source_files = "TensorSwift/*.swift" + s.source_files = "Sources/*.swift" end diff --git a/TensorSwift.xcodeproj/Configs/Project.xcconfig b/TensorSwift.xcodeproj/Configs/Project.xcconfig new file mode 100644 index 0000000..5f63024 --- /dev/null +++ b/TensorSwift.xcodeproj/Configs/Project.xcconfig @@ -0,0 +1,7 @@ +PRODUCT_NAME = $(TARGET_NAME) +SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator +MACOSX_DEPLOYMENT_TARGET = 10.10 +DYLIB_INSTALL_NAME_BASE = @rpath +OTHER_SWIFT_FLAGS = -DXcode +COMBINE_HIDPI_IMAGES = YES +USE_HEADERMAP = NO diff --git a/TensorSwift.xcodeproj/TensorSwiftTests_Info.plist b/TensorSwift.xcodeproj/TensorSwiftTests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/TensorSwift.xcodeproj/TensorSwiftTests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/TensorSwift.xcodeproj/TensorSwift_Info.plist b/TensorSwift.xcodeproj/TensorSwift_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/TensorSwift.xcodeproj/TensorSwift_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/TensorSwift.xcodeproj/project.pbxproj b/TensorSwift.xcodeproj/project.pbxproj index f12fb9e..c8db367 100644 --- a/TensorSwift.xcodeproj/project.pbxproj +++ b/TensorSwift.xcodeproj/project.pbxproj @@ -7,139 +7,91 @@ objects = { /* Begin PBXBuildFile section */ - 273614FA1CB3E72200CF4935 /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273614F91CB3E72200CF4935 /* SHA1.swift */; }; - A7E021DB1CAA4B2F00BAFC54 /* CalculationPerformanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E021DA1CAA4B2F00BAFC54 /* CalculationPerformanceTests.swift */; }; - D6312E411CE33BB700985B92 /* Classifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E401CE33BB700985B92 /* Classifier.swift */; }; - D6312E431CE4341500985B92 /* ClassifierTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E421CE4341500985B92 /* ClassifierTest.swift */; }; - D6312E451CE4351100985B92 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E441CE4351100985B92 /* String.swift */; }; - D6312E4F1CE4397500985B92 /* b_conv1 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E471CE4397500985B92 /* b_conv1 */; }; - D6312E501CE4397500985B92 /* b_conv1 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E471CE4397500985B92 /* b_conv1 */; }; - D6312E511CE4397500985B92 /* b_conv2 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E481CE4397500985B92 /* b_conv2 */; }; - D6312E521CE4397500985B92 /* b_conv2 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E481CE4397500985B92 /* b_conv2 */; }; - D6312E531CE4397500985B92 /* b_fc1 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E491CE4397500985B92 /* b_fc1 */; }; - D6312E541CE4397500985B92 /* b_fc1 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E491CE4397500985B92 /* b_fc1 */; }; - D6312E551CE4397500985B92 /* b_fc2 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4A1CE4397500985B92 /* b_fc2 */; }; - D6312E561CE4397500985B92 /* b_fc2 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4A1CE4397500985B92 /* b_fc2 */; }; - D6312E571CE4397500985B92 /* W_conv1 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4B1CE4397500985B92 /* W_conv1 */; }; - D6312E581CE4397500985B92 /* W_conv1 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4B1CE4397500985B92 /* W_conv1 */; }; - D6312E591CE4397500985B92 /* W_conv2 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4C1CE4397500985B92 /* W_conv2 */; }; - D6312E5A1CE4397500985B92 /* W_conv2 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4C1CE4397500985B92 /* W_conv2 */; }; - D6312E5B1CE4397500985B92 /* W_fc1 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4D1CE4397500985B92 /* W_fc1 */; }; - D6312E5C1CE4397500985B92 /* W_fc1 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4D1CE4397500985B92 /* W_fc1 */; }; - D6312E5D1CE4397500985B92 /* W_fc2 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4E1CE4397500985B92 /* W_fc2 */; }; - D6312E5E1CE4397500985B92 /* W_fc2 in Resources */ = {isa = PBXBuildFile; fileRef = D6312E4E1CE4397500985B92 /* W_fc2 */; }; - D6312E631CE4699D00985B92 /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E621CE4699D00985B92 /* Array.swift */; }; - D6312E641CE46BDE00985B92 /* TensorSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D69C33E51C8D731C007985D4 /* TensorSwift.framework */; }; - D6312E651CE46BDE00985B92 /* TensorSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D69C33E51C8D731C007985D4 /* TensorSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - D6312E6A1CE484FE00985B92 /* Line.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E691CE484FE00985B92 /* Line.swift */; }; - D6312E6C1CE4852800985B92 /* Canvas.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E6B1CE4852800985B92 /* Canvas.swift */; }; - D6312E6E1CE486A700985B92 /* CanvasView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E6D1CE486A700985B92 /* CanvasView.swift */; }; - D6312E701CE5D7BB00985B92 /* DimensionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E6F1CE5D7BB00985B92 /* DimensionTest.swift */; }; - D63F30041C996F4100B88E12 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63F30031C996F4100B88E12 /* AppDelegate.swift */; }; - D63F30061C996F4100B88E12 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63F30051C996F4100B88E12 /* ViewController.swift */; }; - D63F30091C996F4200B88E12 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D63F30071C996F4200B88E12 /* Main.storyboard */; }; - D63F300B1C996F4200B88E12 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D63F300A1C996F4200B88E12 /* Assets.xcassets */; }; - D63F300E1C996F4200B88E12 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D63F300C1C996F4200B88E12 /* LaunchScreen.storyboard */; }; - D63F30191C996F4200B88E12 /* MNISTTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63F30181C996F4200B88E12 /* MNISTTest.swift */; }; - D66E2A931CCDD3C700859630 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D66E2A921CCDD3C700859630 /* Utils.swift */; }; - D69C33E91C8D731C007985D4 /* TensorSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = D69C33E81C8D731C007985D4 /* TensorSwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D69C33F01C8D731C007985D4 /* TensorSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D69C33E51C8D731C007985D4 /* TensorSwift.framework */; }; - D69C33F51C8D731C007985D4 /* TensorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C33F41C8D731C007985D4 /* TensorTest.swift */; }; - D69C34001C8D735C007985D4 /* Tensor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C33FF1C8D735C007985D4 /* Tensor.swift */; }; - D69C34021C8D7435007985D4 /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34011C8D7435007985D4 /* Shape.swift */; }; - D69C34041C8D7487007985D4 /* Dimension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34031C8D7487007985D4 /* Dimension.swift */; }; - D69C34061C8D8F87007985D4 /* TensorSwiftSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34051C8D8F87007985D4 /* TensorSwiftSample.swift */; }; - D69C34081C8E7D03007985D4 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34071C8E7D03007985D4 /* Operators.swift */; }; - D69C340A1C8E7D44007985D4 /* TensorMath.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34091C8E7D44007985D4 /* TensorMath.swift */; }; - D69C340C1C8E85D0007985D4 /* TensorNN.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C340B1C8E85D0007985D4 /* TensorNN.swift */; }; - D69C34111C8ED4FD007985D4 /* TensorNNTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34101C8ED4FC007985D4 /* TensorNNTest.swift */; }; - D6CE6C8D1CEED6F8004EAAE9 /* TensorSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6CE6C831CEED6F7004EAAE9 /* TensorSwift.framework */; }; - D6CE6CA91CEED72F004EAAE9 /* TensorSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6CE6C9F1CEED72F004EAAE9 /* TensorSwift.framework */; }; - D6CE6CC31CEED89B004EAAE9 /* TensorSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = D69C33E81C8D731C007985D4 /* TensorSwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D6CE6CC41CEED89B004EAAE9 /* Tensor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C33FF1C8D735C007985D4 /* Tensor.swift */; }; - D6CE6CC51CEED89B004EAAE9 /* TensorMath.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34091C8E7D44007985D4 /* TensorMath.swift */; }; - D6CE6CC61CEED89B004EAAE9 /* TensorNN.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C340B1C8E85D0007985D4 /* TensorNN.swift */; }; - D6CE6CC71CEED89B004EAAE9 /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34011C8D7435007985D4 /* Shape.swift */; }; - D6CE6CC81CEED89B004EAAE9 /* Dimension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34031C8D7487007985D4 /* Dimension.swift */; }; - D6CE6CC91CEED89B004EAAE9 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34071C8E7D03007985D4 /* Operators.swift */; }; - D6CE6CCA1CEED89B004EAAE9 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D66E2A921CCDD3C700859630 /* Utils.swift */; }; - D6CE6CCB1CEED89C004EAAE9 /* TensorSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = D69C33E81C8D731C007985D4 /* TensorSwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D6CE6CCC1CEED89C004EAAE9 /* Tensor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C33FF1C8D735C007985D4 /* Tensor.swift */; }; - D6CE6CCD1CEED89C004EAAE9 /* TensorMath.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34091C8E7D44007985D4 /* TensorMath.swift */; }; - D6CE6CCE1CEED89C004EAAE9 /* TensorNN.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C340B1C8E85D0007985D4 /* TensorNN.swift */; }; - D6CE6CCF1CEED89C004EAAE9 /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34011C8D7435007985D4 /* Shape.swift */; }; - D6CE6CD01CEED89C004EAAE9 /* Dimension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34031C8D7487007985D4 /* Dimension.swift */; }; - D6CE6CD11CEED89C004EAAE9 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34071C8E7D03007985D4 /* Operators.swift */; }; - D6CE6CD21CEED89C004EAAE9 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D66E2A921CCDD3C700859630 /* Utils.swift */; }; - D6CE6CD31CEED89D004EAAE9 /* TensorSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = D69C33E81C8D731C007985D4 /* TensorSwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D6CE6CD41CEED89D004EAAE9 /* Tensor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C33FF1C8D735C007985D4 /* Tensor.swift */; }; - D6CE6CD51CEED89D004EAAE9 /* TensorMath.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34091C8E7D44007985D4 /* TensorMath.swift */; }; - D6CE6CD61CEED89D004EAAE9 /* TensorNN.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C340B1C8E85D0007985D4 /* TensorNN.swift */; }; - D6CE6CD71CEED89D004EAAE9 /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34011C8D7435007985D4 /* Shape.swift */; }; - D6CE6CD81CEED89D004EAAE9 /* Dimension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34031C8D7487007985D4 /* Dimension.swift */; }; - D6CE6CD91CEED89D004EAAE9 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34071C8E7D03007985D4 /* Operators.swift */; }; - D6CE6CDA1CEED89D004EAAE9 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D66E2A921CCDD3C700859630 /* Utils.swift */; }; - D6CE6CDB1CEED8AD004EAAE9 /* TensorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C33F41C8D731C007985D4 /* TensorTest.swift */; }; - D6CE6CDC1CEED8AD004EAAE9 /* TensorNNTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34101C8ED4FC007985D4 /* TensorNNTest.swift */; }; - D6CE6CDD1CEED8AD004EAAE9 /* DimensionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E6F1CE5D7BB00985B92 /* DimensionTest.swift */; }; - D6CE6CDE1CEED8AD004EAAE9 /* CalculationPerformanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E021DA1CAA4B2F00BAFC54 /* CalculationPerformanceTests.swift */; }; - D6CE6CDF1CEED8AD004EAAE9 /* TensorSwiftSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34051C8D8F87007985D4 /* TensorSwiftSample.swift */; }; - D6CE6CE01CEED8AF004EAAE9 /* TensorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C33F41C8D731C007985D4 /* TensorTest.swift */; }; - D6CE6CE11CEED8AF004EAAE9 /* TensorNNTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34101C8ED4FC007985D4 /* TensorNNTest.swift */; }; - D6CE6CE21CEED8AF004EAAE9 /* DimensionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6312E6F1CE5D7BB00985B92 /* DimensionTest.swift */; }; - D6CE6CE31CEED8AF004EAAE9 /* CalculationPerformanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E021DA1CAA4B2F00BAFC54 /* CalculationPerformanceTests.swift */; }; - D6CE6CE41CEED8AF004EAAE9 /* TensorSwiftSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69C34051C8D8F87007985D4 /* TensorSwiftSample.swift */; }; - D6D5D4BA1CA24E7C0041BE85 /* Downloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D5D4B91CA24E7C0041BE85 /* Downloader.swift */; }; - D6F63B0D1CB7593000F3C82E /* DownloaderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F63B0C1CB7593000F3C82E /* DownloaderTest.swift */; }; - D6F63B131CB75E8700F3C82E /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D6F63B121CB75E8700F3C82E /* libz.tbd */; }; + A7C046091D9F514600FAF16F /* TensorSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF6F8E1D9BB9660097CEB7 /* TensorSwiftTests.swift */; }; + A7C0460A1D9F514600FAF16F /* CalculationPerformanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF6F811D9BB9240097CEB7 /* CalculationPerformanceTests.swift */; }; + A7C0460B1D9F514600FAF16F /* DimensionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF6F821D9BB9240097CEB7 /* DimensionTests.swift */; }; + A7C0460C1D9F514600FAF16F /* PowerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF6F841D9BB9240097CEB7 /* PowerTests.swift */; }; + A7C0460D1D9F514600FAF16F /* TensorNNTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF6F851D9BB9240097CEB7 /* TensorNNTests.swift */; }; + A7C0460E1D9F514600FAF16F /* TensorSwiftSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF6F861D9BB9240097CEB7 /* TensorSwiftSample.swift */; }; + A7C0460F1D9F514600FAF16F /* TensorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF6F871D9BB9240097CEB7 /* TensorTests.swift */; }; + A7C387A91D9F604900091506 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387A81D9F604900091506 /* AppDelegate.swift */; }; + A7C387AB1D9F604900091506 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387AA1D9F604900091506 /* ViewController.swift */; }; + A7C387AE1D9F604900091506 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A7C387AC1D9F604900091506 /* Main.storyboard */; }; + A7C387B01D9F604900091506 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7C387AF1D9F604900091506 /* Assets.xcassets */; }; + A7C387B31D9F604900091506 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A7C387B11D9F604900091506 /* LaunchScreen.storyboard */; }; + A7C387BE1D9F604900091506 /* MNISTTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387BD1D9F604900091506 /* MNISTTests.swift */; }; + A7C387C91D9F604A00091506 /* MNISTUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387C81D9F604A00091506 /* MNISTUITests.swift */; }; + A7C387D91D9F60F100091506 /* Canvas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387D41D9F60F100091506 /* Canvas.swift */; }; + A7C387DA1D9F60F100091506 /* CanvasView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387D51D9F60F100091506 /* CanvasView.swift */; }; + A7C387DB1D9F60F100091506 /* Classifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387D61D9F60F100091506 /* Classifier.swift */; }; + A7C387DC1D9F60F100091506 /* Line.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387D71D9F60F100091506 /* Line.swift */; }; + A7C387DD1D9F60F100091506 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387D81D9F60F100091506 /* String.swift */; }; + A7C387DE1D9F611D00091506 /* TensorSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "_____Product_TensorSwift" /* TensorSwift.framework */; }; + A7C387DF1D9F611D00091506 /* TensorSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = "_____Product_TensorSwift" /* TensorSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + A7C387E91D9F614E00091506 /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387E31D9F614E00091506 /* Array.swift */; }; + A7C387EA1D9F614E00091506 /* ClassifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387E41D9F614E00091506 /* ClassifierTests.swift */; }; + A7C387EB1D9F614E00091506 /* Downloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387E51D9F614E00091506 /* Downloader.swift */; }; + A7C387EC1D9F614F00091506 /* DownloaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387E61D9F614E00091506 /* DownloaderTests.swift */; }; + A7C387ED1D9F614F00091506 /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C387E81D9F614E00091506 /* SHA1.swift */; }; + A7C387F71D9F616600091506 /* b_conv1 in Resources */ = {isa = PBXBuildFile; fileRef = A7C387EF1D9F616600091506 /* b_conv1 */; }; + A7C387F81D9F616600091506 /* b_conv2 in Resources */ = {isa = PBXBuildFile; fileRef = A7C387F01D9F616600091506 /* b_conv2 */; }; + A7C387F91D9F616600091506 /* b_fc1 in Resources */ = {isa = PBXBuildFile; fileRef = A7C387F11D9F616600091506 /* b_fc1 */; }; + A7C387FA1D9F616600091506 /* b_fc2 in Resources */ = {isa = PBXBuildFile; fileRef = A7C387F21D9F616600091506 /* b_fc2 */; }; + A7C387FB1D9F616600091506 /* W_conv1 in Resources */ = {isa = PBXBuildFile; fileRef = A7C387F31D9F616600091506 /* W_conv1 */; }; + A7C387FC1D9F616600091506 /* W_conv2 in Resources */ = {isa = PBXBuildFile; fileRef = A7C387F41D9F616600091506 /* W_conv2 */; }; + A7C387FD1D9F616600091506 /* W_fc1 in Resources */ = {isa = PBXBuildFile; fileRef = A7C387F51D9F616600091506 /* W_fc1 */; }; + A7C387FE1D9F616600091506 /* W_fc2 in Resources */ = {isa = PBXBuildFile; fileRef = A7C387F61D9F616600091506 /* W_fc2 */; }; + A7C388031D9F629A00091506 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C388001D9F619000091506 /* libz.tbd */; }; + D646CEF61DBE1A25003E8A59 /* TensorMathTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D646CEF51DBE1A25003E8A59 /* TensorMathTest.swift */; }; + _LinkFileRef_TensorSwift_via_TensorSwiftTests /* TensorSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "_____Product_TensorSwift" /* TensorSwift.framework */; }; + __src_cc_ref_Sources/Dimension.swift /* Dimension.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/Dimension.swift /* Dimension.swift */; }; + __src_cc_ref_Sources/Operators.swift /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/Operators.swift /* Operators.swift */; }; + __src_cc_ref_Sources/Shape.swift /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/Shape.swift /* Shape.swift */; }; + __src_cc_ref_Sources/Tensor.swift /* Tensor.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/Tensor.swift /* Tensor.swift */; }; + __src_cc_ref_Sources/TensorMath.swift /* TensorMath.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/TensorMath.swift /* TensorMath.swift */; }; + __src_cc_ref_Sources/TensorNN.swift /* TensorNN.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/TensorNN.swift /* TensorNN.swift */; }; + __src_cc_ref_Sources/Utils.swift /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = __PBXFileRef_Sources/Utils.swift /* Utils.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - D6312E661CE46BDE00985B92 /* PBXContainerItemProxy */ = { + A7C387BA1D9F604900091506 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D69C33DC1C8D731C007985D4 /* Project object */; + containerPortal = __RootObject_ /* Project object */; proxyType = 1; - remoteGlobalIDString = D69C33E41C8D731C007985D4; - remoteInfo = TensorSwift; + remoteGlobalIDString = A7C387A51D9F604900091506; + remoteInfo = MNIST; }; - D63F30151C996F4200B88E12 /* PBXContainerItemProxy */ = { + A7C387C51D9F604A00091506 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D69C33DC1C8D731C007985D4 /* Project object */; + containerPortal = __RootObject_ /* Project object */; proxyType = 1; - remoteGlobalIDString = D63F30001C996F4100B88E12; + remoteGlobalIDString = A7C387A51D9F604900091506; remoteInfo = MNIST; }; - D69C33F11C8D731C007985D4 /* PBXContainerItemProxy */ = { + A7C387E01D9F611D00091506 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D69C33DC1C8D731C007985D4 /* Project object */; + containerPortal = __RootObject_ /* Project object */; proxyType = 1; - remoteGlobalIDString = D69C33E41C8D731C007985D4; + remoteGlobalIDString = "______Target_TensorSwift"; remoteInfo = TensorSwift; }; - D6CE6C8E1CEED6F8004EAAE9 /* PBXContainerItemProxy */ = { + A7DF6EB61D9A1AC40097CEB7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D69C33DC1C8D731C007985D4 /* Project object */; + containerPortal = __RootObject_ /* Project object */; proxyType = 1; - remoteGlobalIDString = D6CE6C821CEED6F7004EAAE9; - remoteInfo = "TensorSwift-OSX"; - }; - D6CE6CAA1CEED72F004EAAE9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D69C33DC1C8D731C007985D4 /* Project object */; - proxyType = 1; - remoteGlobalIDString = D6CE6C9E1CEED72F004EAAE9; - remoteInfo = "TensorSwift-tvOS"; + remoteGlobalIDString = "______Target_TensorSwift"; + remoteInfo = TensorSwift; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - D6312E681CE46BDE00985B92 /* Embed Frameworks */ = { + A7C387E21D9F611E00091506 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - D6312E651CE46BDE00985B92 /* TensorSwift.framework in Embed Frameworks */, + A7C387DF1D9F611D00091506 /* TensorSwift.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -147,480 +99,383 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 273614F91CB3E72200CF4935 /* SHA1.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SHA1.swift; sourceTree = ""; }; - 273614FC1CB3E81B00CF4935 /* MNISTTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MNISTTests-Bridging-Header.h"; sourceTree = ""; }; - A7E021DA1CAA4B2F00BAFC54 /* CalculationPerformanceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalculationPerformanceTests.swift; sourceTree = ""; }; - D6312E401CE33BB700985B92 /* Classifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Classifier.swift; sourceTree = ""; }; - D6312E421CE4341500985B92 /* ClassifierTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClassifierTest.swift; sourceTree = ""; }; - D6312E441CE4351100985B92 /* String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; - D6312E471CE4397500985B92 /* b_conv1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = b_conv1; sourceTree = ""; }; - D6312E481CE4397500985B92 /* b_conv2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = b_conv2; sourceTree = ""; }; - D6312E491CE4397500985B92 /* b_fc1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = b_fc1; sourceTree = ""; }; - D6312E4A1CE4397500985B92 /* b_fc2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = b_fc2; sourceTree = ""; }; - D6312E4B1CE4397500985B92 /* W_conv1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = W_conv1; sourceTree = ""; }; - D6312E4C1CE4397500985B92 /* W_conv2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = W_conv2; sourceTree = ""; }; - D6312E4D1CE4397500985B92 /* W_fc1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = W_fc1; sourceTree = ""; }; - D6312E4E1CE4397500985B92 /* W_fc2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = W_fc2; sourceTree = ""; }; - D6312E621CE4699D00985B92 /* Array.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Array.swift; sourceTree = ""; }; - D6312E691CE484FE00985B92 /* Line.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Line.swift; sourceTree = ""; }; - D6312E6B1CE4852800985B92 /* Canvas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Canvas.swift; sourceTree = ""; }; - D6312E6D1CE486A700985B92 /* CanvasView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CanvasView.swift; sourceTree = ""; }; - D6312E6F1CE5D7BB00985B92 /* DimensionTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DimensionTest.swift; sourceTree = ""; }; - D63F30011C996F4100B88E12 /* MNIST.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MNIST.app; sourceTree = BUILT_PRODUCTS_DIR; }; - D63F30031C996F4100B88E12 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - D63F30051C996F4100B88E12 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - D63F30081C996F4200B88E12 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - D63F300A1C996F4200B88E12 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - D63F300D1C996F4200B88E12 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - D63F300F1C996F4200B88E12 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D63F30141C996F4200B88E12 /* MNISTTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MNISTTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - D63F30181C996F4200B88E12 /* MNISTTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MNISTTest.swift; sourceTree = ""; }; - D63F301A1C996F4200B88E12 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D66E2A921CCDD3C700859630 /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; - D69C33E51C8D731C007985D4 /* TensorSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TensorSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D69C33E81C8D731C007985D4 /* TensorSwift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TensorSwift.h; sourceTree = ""; }; - D69C33EA1C8D731C007985D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D69C33EF1C8D731C007985D4 /* TensorSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TensorSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - D69C33F41C8D731C007985D4 /* TensorTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TensorTest.swift; sourceTree = ""; }; - D69C33F61C8D731C007985D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D69C33FF1C8D735C007985D4 /* Tensor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Tensor.swift; sourceTree = ""; }; - D69C34011C8D7435007985D4 /* Shape.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Shape.swift; sourceTree = ""; }; - D69C34031C8D7487007985D4 /* Dimension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dimension.swift; sourceTree = ""; }; - D69C34051C8D8F87007985D4 /* TensorSwiftSample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorSwiftSample.swift; sourceTree = ""; }; - D69C34071C8E7D03007985D4 /* Operators.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Operators.swift; sourceTree = ""; }; - D69C34091C8E7D44007985D4 /* TensorMath.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorMath.swift; sourceTree = ""; }; - D69C340B1C8E85D0007985D4 /* TensorNN.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorNN.swift; sourceTree = ""; }; - D69C34101C8ED4FC007985D4 /* TensorNNTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorNNTest.swift; sourceTree = ""; }; - D6CE6C831CEED6F7004EAAE9 /* TensorSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TensorSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6CE6C8C1CEED6F8004EAAE9 /* TensorSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TensorSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - D6CE6C9F1CEED72F004EAAE9 /* TensorSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TensorSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6CE6CA81CEED72F004EAAE9 /* TensorSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TensorSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - D6CE6CBB1CEED740004EAAE9 /* TensorSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TensorSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6D5D4B91CA24E7C0041BE85 /* Downloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Downloader.swift; sourceTree = ""; }; - D6F63B0C1CB7593000F3C82E /* DownloaderTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DownloaderTest.swift; sourceTree = ""; }; - D6F63B121CB75E8700F3C82E /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + A7C387A61D9F604900091506 /* MNIST.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MNIST.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A7C387A81D9F604900091506 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A7C387AA1D9F604900091506 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + A7C387AD1D9F604900091506 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + A7C387AF1D9F604900091506 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A7C387B21D9F604900091506 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + A7C387B41D9F604900091506 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A7C387B91D9F604900091506 /* MNISTTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MNISTTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A7C387BD1D9F604900091506 /* MNISTTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MNISTTests.swift; sourceTree = ""; }; + A7C387BF1D9F604900091506 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A7C387C41D9F604A00091506 /* MNISTUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MNISTUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A7C387C81D9F604A00091506 /* MNISTUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MNISTUITests.swift; sourceTree = ""; }; + A7C387CA1D9F604A00091506 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A7C387D41D9F60F100091506 /* Canvas.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Canvas.swift; sourceTree = ""; }; + A7C387D51D9F60F100091506 /* CanvasView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CanvasView.swift; sourceTree = ""; }; + A7C387D61D9F60F100091506 /* Classifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Classifier.swift; sourceTree = ""; }; + A7C387D71D9F60F100091506 /* Line.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Line.swift; sourceTree = ""; }; + A7C387D81D9F60F100091506 /* String.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; }; + A7C387E31D9F614E00091506 /* Array.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Array.swift; sourceTree = ""; }; + A7C387E41D9F614E00091506 /* ClassifierTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClassifierTests.swift; sourceTree = ""; }; + A7C387E51D9F614E00091506 /* Downloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Downloader.swift; sourceTree = ""; }; + A7C387E61D9F614E00091506 /* DownloaderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DownloaderTests.swift; sourceTree = ""; }; + A7C387E71D9F614E00091506 /* MNISTTests-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MNISTTests-Bridging-Header.h"; sourceTree = ""; }; + A7C387E81D9F614E00091506 /* SHA1.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SHA1.swift; sourceTree = ""; }; + A7C387EF1D9F616600091506 /* b_conv1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = b_conv1; sourceTree = ""; }; + A7C387F01D9F616600091506 /* b_conv2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = b_conv2; sourceTree = ""; }; + A7C387F11D9F616600091506 /* b_fc1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = b_fc1; sourceTree = ""; }; + A7C387F21D9F616600091506 /* b_fc2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = b_fc2; sourceTree = ""; }; + A7C387F31D9F616600091506 /* W_conv1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = W_conv1; sourceTree = ""; }; + A7C387F41D9F616600091506 /* W_conv2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = W_conv2; sourceTree = ""; }; + A7C387F51D9F616600091506 /* W_fc1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = W_fc1; sourceTree = ""; }; + A7C387F61D9F616600091506 /* W_fc2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = W_fc2; sourceTree = ""; }; + A7C388001D9F619000091506 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; }; + A7DF6F811D9BB9240097CEB7 /* CalculationPerformanceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalculationPerformanceTests.swift; sourceTree = ""; }; + A7DF6F821D9BB9240097CEB7 /* DimensionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DimensionTests.swift; sourceTree = ""; }; + A7DF6F841D9BB9240097CEB7 /* PowerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PowerTests.swift; sourceTree = ""; }; + A7DF6F851D9BB9240097CEB7 /* TensorNNTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorNNTests.swift; sourceTree = ""; }; + A7DF6F861D9BB9240097CEB7 /* TensorSwiftSample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorSwiftSample.swift; sourceTree = ""; }; + A7DF6F871D9BB9240097CEB7 /* TensorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorTests.swift; sourceTree = ""; }; + A7DF6F8E1D9BB9660097CEB7 /* TensorSwiftTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorSwiftTests.swift; sourceTree = ""; }; + D646CEF51DBE1A25003E8A59 /* TensorMathTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TensorMathTest.swift; sourceTree = ""; }; + __PBXFileRef_Package.swift /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + __PBXFileRef_Resources /* Resources */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Resources; sourceTree = ""; }; + __PBXFileRef_Sources/Dimension.swift /* Dimension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dimension.swift; sourceTree = ""; }; + __PBXFileRef_Sources/Operators.swift /* Operators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Operators.swift; sourceTree = ""; }; + __PBXFileRef_Sources/Shape.swift /* Shape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Shape.swift; sourceTree = ""; }; + __PBXFileRef_Sources/Tensor.swift /* Tensor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tensor.swift; sourceTree = ""; }; + __PBXFileRef_Sources/TensorMath.swift /* TensorMath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TensorMath.swift; sourceTree = ""; }; + __PBXFileRef_Sources/TensorNN.swift /* TensorNN.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TensorNN.swift; sourceTree = ""; }; + __PBXFileRef_Sources/Utils.swift /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; + __PBXFileRef_TensorSwift.xcodeproj/Configs/Project.xcconfig /* TensorSwift.xcodeproj/Configs/Project.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = TensorSwift.xcodeproj/Configs/Project.xcconfig; sourceTree = ""; }; + "_____Product_TensorSwift" /* TensorSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TensorSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + "_____Product_TensorSwiftTests" /* TensorSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = TensorSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - D63F2FFE1C996F4100B88E12 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D6312E641CE46BDE00985B92 /* TensorSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D63F30111C996F4200B88E12 /* Frameworks */ = { + A7C387A31D9F604900091506 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D6F63B131CB75E8700F3C82E /* libz.tbd in Frameworks */, + A7C387DE1D9F611D00091506 /* TensorSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D69C33E11C8D731C007985D4 /* Frameworks */ = { + A7C387B61D9F604900091506 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A7C388031D9F629A00091506 /* libz.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D69C33EC1C8D731C007985D4 /* Frameworks */ = { + A7C387C11D9F604A00091506 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D69C33F01C8D731C007985D4 /* TensorSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D6CE6C7F1CEED6F7004EAAE9 /* Frameworks */ = { + "___LinkPhase_TensorSwift" /* Frameworks */ = { isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - D6CE6C891CEED6F8004EAAE9 /* Frameworks */ = { + "___LinkPhase_TensorSwiftTests" /* Frameworks */ = { isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( - D6CE6C8D1CEED6F8004EAAE9 /* TensorSwift.framework in Frameworks */, + _LinkFileRef_TensorSwift_via_TensorSwiftTests /* TensorSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D6CE6C9B1CEED72F004EAAE9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A7C387A71D9F604900091506 /* MNIST */ = { + isa = PBXGroup; + children = ( + A7C387EE1D9F616600091506 /* Models */, + A7C387A81D9F604900091506 /* AppDelegate.swift */, + A7C387AA1D9F604900091506 /* ViewController.swift */, + A7C387D41D9F60F100091506 /* Canvas.swift */, + A7C387D51D9F60F100091506 /* CanvasView.swift */, + A7C387D61D9F60F100091506 /* Classifier.swift */, + A7C387D71D9F60F100091506 /* Line.swift */, + A7C387D81D9F60F100091506 /* String.swift */, + A7C387AC1D9F604900091506 /* Main.storyboard */, + A7C387AF1D9F604900091506 /* Assets.xcassets */, + A7C387B11D9F604900091506 /* LaunchScreen.storyboard */, + A7C387B41D9F604900091506 /* Info.plist */, ); - runOnlyForDeploymentPostprocessing = 0; + path = MNIST; + sourceTree = ""; }; - D6CE6CA51CEED72F004EAAE9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D6CE6CA91CEED72F004EAAE9 /* TensorSwift.framework in Frameworks */, + A7C387BC1D9F604900091506 /* MNISTTests */ = { + isa = PBXGroup; + children = ( + A7C387BD1D9F604900091506 /* MNISTTests.swift */, + A7C387E51D9F614E00091506 /* Downloader.swift */, + A7C387E61D9F614E00091506 /* DownloaderTests.swift */, + A7C387E31D9F614E00091506 /* Array.swift */, + A7C387E81D9F614E00091506 /* SHA1.swift */, + A7C387E41D9F614E00091506 /* ClassifierTests.swift */, + A7C387E71D9F614E00091506 /* MNISTTests-Bridging-Header.h */, + A7C387BF1D9F604900091506 /* Info.plist */, ); - runOnlyForDeploymentPostprocessing = 0; + path = MNISTTests; + sourceTree = ""; }; - D6CE6CB71CEED740004EAAE9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( + A7C387C71D9F604A00091506 /* MNISTUITests */ = { + isa = PBXGroup; + children = ( + A7C387C81D9F604A00091506 /* MNISTUITests.swift */, + A7C387CA1D9F604A00091506 /* Info.plist */, ); - runOnlyForDeploymentPostprocessing = 0; + path = MNISTUITests; + sourceTree = ""; }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - D6312E461CE4397500985B92 /* Models */ = { + A7C387EE1D9F616600091506 /* Models */ = { isa = PBXGroup; children = ( - D6312E471CE4397500985B92 /* b_conv1 */, - D6312E481CE4397500985B92 /* b_conv2 */, - D6312E491CE4397500985B92 /* b_fc1 */, - D6312E4A1CE4397500985B92 /* b_fc2 */, - D6312E4B1CE4397500985B92 /* W_conv1 */, - D6312E4C1CE4397500985B92 /* W_conv2 */, - D6312E4D1CE4397500985B92 /* W_fc1 */, - D6312E4E1CE4397500985B92 /* W_fc2 */, + A7C387EF1D9F616600091506 /* b_conv1 */, + A7C387F01D9F616600091506 /* b_conv2 */, + A7C387F11D9F616600091506 /* b_fc1 */, + A7C387F21D9F616600091506 /* b_fc2 */, + A7C387F31D9F616600091506 /* W_conv1 */, + A7C387F41D9F616600091506 /* W_conv2 */, + A7C387F51D9F616600091506 /* W_fc1 */, + A7C387F61D9F616600091506 /* W_fc2 */, ); path = Models; sourceTree = ""; }; - D63F30021C996F4100B88E12 /* MNIST */ = { + A7C387FF1D9F619000091506 /* Frameworks */ = { isa = PBXGroup; children = ( - D63F30031C996F4100B88E12 /* AppDelegate.swift */, - D63F30051C996F4100B88E12 /* ViewController.swift */, - D6312E401CE33BB700985B92 /* Classifier.swift */, - D6312E441CE4351100985B92 /* String.swift */, - D6312E6D1CE486A700985B92 /* CanvasView.swift */, - D6312E691CE484FE00985B92 /* Line.swift */, - D6312E6B1CE4852800985B92 /* Canvas.swift */, - D63F30071C996F4200B88E12 /* Main.storyboard */, - D63F300A1C996F4200B88E12 /* Assets.xcassets */, - D63F300C1C996F4200B88E12 /* LaunchScreen.storyboard */, - D63F300F1C996F4200B88E12 /* Info.plist */, - D6312E461CE4397500985B92 /* Models */, + A7C388001D9F619000091506 /* libz.tbd */, ); - path = MNIST; + name = Frameworks; sourceTree = ""; }; - D63F30171C996F4200B88E12 /* MNISTTests */ = { + TestProducts_ /* Tests */ = { isa = PBXGroup; children = ( - D63F30181C996F4200B88E12 /* MNISTTest.swift */, - D6312E421CE4341500985B92 /* ClassifierTest.swift */, - D6F63B0C1CB7593000F3C82E /* DownloaderTest.swift */, - D6D5D4B91CA24E7C0041BE85 /* Downloader.swift */, - D6312E621CE4699D00985B92 /* Array.swift */, - 273614F91CB3E72200CF4935 /* SHA1.swift */, - 273614FC1CB3E81B00CF4935 /* MNISTTests-Bridging-Header.h */, - D63F301A1C996F4200B88E12 /* Info.plist */, + "_____Product_TensorSwiftTests" /* TensorSwiftTests.xctest */, ); - path = MNISTTests; + name = Tests; sourceTree = ""; }; - D69C33DB1C8D731C007985D4 = { + "___RootGroup_" = { isa = PBXGroup; children = ( - D6F63B121CB75E8700F3C82E /* libz.tbd */, - D69C33E71C8D731C007985D4 /* TensorSwift */, - D69C33F31C8D731C007985D4 /* TensorSwiftTests */, - D63F30021C996F4100B88E12 /* MNIST */, - D63F30171C996F4200B88E12 /* MNISTTests */, - D69C33E61C8D731C007985D4 /* Products */, + __PBXFileRef_Package.swift /* Package.swift */, + "_____Configs_" /* Configs */, + "_____Sources_" /* Sources */, + __PBXFileRef_Resources /* Resources */, + "_______Tests_" /* Tests */, + A7C387A71D9F604900091506 /* MNIST */, + A7C387BC1D9F604900091506 /* MNISTTests */, + A7C387C71D9F604A00091506 /* MNISTUITests */, + "____Products_" /* Products */, + A7C387FF1D9F619000091506 /* Frameworks */, ); sourceTree = ""; }; - D69C33E61C8D731C007985D4 /* Products */ = { + "____Products_" /* Products */ = { isa = PBXGroup; children = ( - D69C33E51C8D731C007985D4 /* TensorSwift.framework */, - D69C33EF1C8D731C007985D4 /* TensorSwiftTests.xctest */, - D63F30011C996F4100B88E12 /* MNIST.app */, - D63F30141C996F4200B88E12 /* MNISTTests.xctest */, - D6CE6C831CEED6F7004EAAE9 /* TensorSwift.framework */, - D6CE6C8C1CEED6F8004EAAE9 /* TensorSwiftTests.xctest */, - D6CE6C9F1CEED72F004EAAE9 /* TensorSwift.framework */, - D6CE6CA81CEED72F004EAAE9 /* TensorSwiftTests.xctest */, - D6CE6CBB1CEED740004EAAE9 /* TensorSwift.framework */, + TestProducts_ /* Tests */, + "_____Product_TensorSwift" /* TensorSwift.framework */, + A7C387A61D9F604900091506 /* MNIST.app */, + A7C387B91D9F604900091506 /* MNISTTests.xctest */, + A7C387C41D9F604A00091506 /* MNISTUITests.xctest */, ); name = Products; sourceTree = ""; }; - D69C33E71C8D731C007985D4 /* TensorSwift */ = { + "_____Configs_" /* Configs */ = { isa = PBXGroup; children = ( - D69C33E81C8D731C007985D4 /* TensorSwift.h */, - D69C33EA1C8D731C007985D4 /* Info.plist */, - D69C33FF1C8D735C007985D4 /* Tensor.swift */, - D69C34091C8E7D44007985D4 /* TensorMath.swift */, - D69C340B1C8E85D0007985D4 /* TensorNN.swift */, - D69C34011C8D7435007985D4 /* Shape.swift */, - D69C34031C8D7487007985D4 /* Dimension.swift */, - D69C34071C8E7D03007985D4 /* Operators.swift */, - D66E2A921CCDD3C700859630 /* Utils.swift */, + __PBXFileRef_TensorSwift.xcodeproj/Configs/Project.xcconfig /* TensorSwift.xcodeproj/Configs/Project.xcconfig */, ); - path = TensorSwift; + name = Configs; sourceTree = ""; }; - D69C33F31C8D731C007985D4 /* TensorSwiftTests */ = { + "_____Sources_" /* Sources */ = { isa = PBXGroup; children = ( - D69C33F41C8D731C007985D4 /* TensorTest.swift */, - D69C34101C8ED4FC007985D4 /* TensorNNTest.swift */, - D6312E6F1CE5D7BB00985B92 /* DimensionTest.swift */, - A7E021DA1CAA4B2F00BAFC54 /* CalculationPerformanceTests.swift */, - D69C34051C8D8F87007985D4 /* TensorSwiftSample.swift */, - D69C33F61C8D731C007985D4 /* Info.plist */, + "_______Group_TensorSwift" /* TensorSwift */, ); - path = TensorSwiftTests; + name = Sources; sourceTree = ""; }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - D69C33E21C8D731C007985D4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D69C33E91C8D731C007985D4 /* TensorSwift.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6CE6C801CEED6F7004EAAE9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D6CE6CC31CEED89B004EAAE9 /* TensorSwift.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; + "_______Group_TensorSwift" /* TensorSwift */ = { + isa = PBXGroup; + children = ( + __PBXFileRef_Sources/Dimension.swift /* Dimension.swift */, + __PBXFileRef_Sources/Operators.swift /* Operators.swift */, + __PBXFileRef_Sources/Shape.swift /* Shape.swift */, + __PBXFileRef_Sources/Tensor.swift /* Tensor.swift */, + __PBXFileRef_Sources/TensorMath.swift /* TensorMath.swift */, + __PBXFileRef_Sources/TensorNN.swift /* TensorNN.swift */, + __PBXFileRef_Sources/Utils.swift /* Utils.swift */, + ); + name = TensorSwift; + path = Sources; + sourceTree = ""; }; - D6CE6C9C1CEED72F004EAAE9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D6CE6CCB1CEED89C004EAAE9 /* TensorSwift.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; + "_______Group_TensorSwiftTests" /* TensorSwiftTests */ = { + isa = PBXGroup; + children = ( + A7DF6F8E1D9BB9660097CEB7 /* TensorSwiftTests.swift */, + A7DF6F811D9BB9240097CEB7 /* CalculationPerformanceTests.swift */, + A7DF6F821D9BB9240097CEB7 /* DimensionTests.swift */, + A7DF6F841D9BB9240097CEB7 /* PowerTests.swift */, + D646CEF51DBE1A25003E8A59 /* TensorMathTest.swift */, + A7DF6F851D9BB9240097CEB7 /* TensorNNTests.swift */, + A7DF6F861D9BB9240097CEB7 /* TensorSwiftSample.swift */, + A7DF6F871D9BB9240097CEB7 /* TensorTests.swift */, + ); + name = TensorSwiftTests; + path = Tests/TensorSwiftTests; + sourceTree = ""; }; - D6CE6CB81CEED740004EAAE9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D6CE6CD31CEED89D004EAAE9 /* TensorSwift.h in Headers */, + "_______Tests_" /* Tests */ = { + isa = PBXGroup; + children = ( + "_______Group_TensorSwiftTests" /* TensorSwiftTests */, ); - runOnlyForDeploymentPostprocessing = 0; + name = Tests; + sourceTree = ""; }; -/* End PBXHeadersBuildPhase section */ +/* End PBXGroup section */ /* Begin PBXNativeTarget section */ - D63F30001C996F4100B88E12 /* MNIST */ = { + A7C387A51D9F604900091506 /* MNIST */ = { isa = PBXNativeTarget; - buildConfigurationList = D63F301F1C996F4200B88E12 /* Build configuration list for PBXNativeTarget "MNIST" */; + buildConfigurationList = A7C387D11D9F604A00091506 /* Build configuration list for PBXNativeTarget "MNIST" */; buildPhases = ( - D63F2FFD1C996F4100B88E12 /* Sources */, - D63F2FFE1C996F4100B88E12 /* Frameworks */, - D63F2FFF1C996F4100B88E12 /* Resources */, - D6312E681CE46BDE00985B92 /* Embed Frameworks */, + A7C387A21D9F604900091506 /* Sources */, + A7C387A31D9F604900091506 /* Frameworks */, + A7C387A41D9F604900091506 /* Resources */, + A7C387E21D9F611E00091506 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( - D6312E671CE46BDE00985B92 /* PBXTargetDependency */, + A7C387E11D9F611D00091506 /* PBXTargetDependency */, ); name = MNIST; productName = MNIST; - productReference = D63F30011C996F4100B88E12 /* MNIST.app */; + productReference = A7C387A61D9F604900091506 /* MNIST.app */; productType = "com.apple.product-type.application"; }; - D63F30131C996F4200B88E12 /* MNISTTests */ = { + A7C387B81D9F604900091506 /* MNISTTests */ = { isa = PBXNativeTarget; - buildConfigurationList = D63F30201C996F4200B88E12 /* Build configuration list for PBXNativeTarget "MNISTTests" */; + buildConfigurationList = A7C387D21D9F604A00091506 /* Build configuration list for PBXNativeTarget "MNISTTests" */; buildPhases = ( - D63F30101C996F4200B88E12 /* Sources */, - D63F30111C996F4200B88E12 /* Frameworks */, - D63F30121C996F4200B88E12 /* Resources */, + A7C387B51D9F604900091506 /* Sources */, + A7C387B61D9F604900091506 /* Frameworks */, + A7C387B71D9F604900091506 /* Resources */, ); buildRules = ( ); dependencies = ( - D63F30161C996F4200B88E12 /* PBXTargetDependency */, + A7C387BB1D9F604900091506 /* PBXTargetDependency */, ); name = MNISTTests; productName = MNISTTests; - productReference = D63F30141C996F4200B88E12 /* MNISTTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - D69C33E41C8D731C007985D4 /* TensorSwift-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = D69C33F91C8D731C007985D4 /* Build configuration list for PBXNativeTarget "TensorSwift-iOS" */; - buildPhases = ( - D69C33E01C8D731C007985D4 /* Sources */, - D69C33E11C8D731C007985D4 /* Frameworks */, - D69C33E21C8D731C007985D4 /* Headers */, - D69C33E31C8D731C007985D4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "TensorSwift-iOS"; - productName = TensorSwift; - productReference = D69C33E51C8D731C007985D4 /* TensorSwift.framework */; - productType = "com.apple.product-type.framework"; - }; - D69C33EE1C8D731C007985D4 /* TensorSwiftTests-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = D69C33FC1C8D731C007985D4 /* Build configuration list for PBXNativeTarget "TensorSwiftTests-iOS" */; - buildPhases = ( - D69C33EB1C8D731C007985D4 /* Sources */, - D69C33EC1C8D731C007985D4 /* Frameworks */, - D69C33ED1C8D731C007985D4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - D69C33F21C8D731C007985D4 /* PBXTargetDependency */, - ); - name = "TensorSwiftTests-iOS"; - productName = TensorSwiftTests; - productReference = D69C33EF1C8D731C007985D4 /* TensorSwiftTests.xctest */; + productReference = A7C387B91D9F604900091506 /* MNISTTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - D6CE6C821CEED6F7004EAAE9 /* TensorSwift-OSX */ = { + A7C387C31D9F604A00091506 /* MNISTUITests */ = { isa = PBXNativeTarget; - buildConfigurationList = D6CE6C981CEED6F8004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwift-OSX" */; + buildConfigurationList = A7C387D31D9F604A00091506 /* Build configuration list for PBXNativeTarget "MNISTUITests" */; buildPhases = ( - D6CE6C7E1CEED6F7004EAAE9 /* Sources */, - D6CE6C7F1CEED6F7004EAAE9 /* Frameworks */, - D6CE6C801CEED6F7004EAAE9 /* Headers */, - D6CE6C811CEED6F7004EAAE9 /* Resources */, + A7C387C01D9F604A00091506 /* Sources */, + A7C387C11D9F604A00091506 /* Frameworks */, + A7C387C21D9F604A00091506 /* Resources */, ); buildRules = ( ); dependencies = ( + A7C387C61D9F604A00091506 /* PBXTargetDependency */, ); - name = "TensorSwift-OSX"; - productName = "TensorSwift-OSX"; - productReference = D6CE6C831CEED6F7004EAAE9 /* TensorSwift.framework */; - productType = "com.apple.product-type.framework"; + name = MNISTUITests; + productName = MNISTUITests; + productReference = A7C387C41D9F604A00091506 /* MNISTUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; }; - D6CE6C8B1CEED6F8004EAAE9 /* TensorSwiftTests-OSX */ = { + "______Target_TensorSwift" /* TensorSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = D6CE6C991CEED6F8004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwiftTests-OSX" */; + buildConfigurationList = "_______Confs_TensorSwift" /* Build configuration list for PBXNativeTarget "TensorSwift" */; buildPhases = ( - D6CE6C881CEED6F8004EAAE9 /* Sources */, - D6CE6C891CEED6F8004EAAE9 /* Frameworks */, - D6CE6C8A1CEED6F8004EAAE9 /* Resources */, + CompilePhase_TensorSwift /* Sources */, + "___LinkPhase_TensorSwift" /* Frameworks */, ); buildRules = ( ); dependencies = ( - D6CE6C8F1CEED6F8004EAAE9 /* PBXTargetDependency */, ); - name = "TensorSwiftTests-OSX"; - productName = "TensorSwift-OSXTests"; - productReference = D6CE6C8C1CEED6F8004EAAE9 /* TensorSwiftTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - D6CE6C9E1CEED72F004EAAE9 /* TensorSwift-tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6CE6CB01CEED72F004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwift-tvOS" */; - buildPhases = ( - D6CE6C9A1CEED72F004EAAE9 /* Sources */, - D6CE6C9B1CEED72F004EAAE9 /* Frameworks */, - D6CE6C9C1CEED72F004EAAE9 /* Headers */, - D6CE6C9D1CEED72F004EAAE9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "TensorSwift-tvOS"; - productName = "TensorSwift-tvOS"; - productReference = D6CE6C9F1CEED72F004EAAE9 /* TensorSwift.framework */; + name = TensorSwift; + productName = TensorSwift; + productReference = "_____Product_TensorSwift" /* TensorSwift.framework */; productType = "com.apple.product-type.framework"; }; - D6CE6CA71CEED72F004EAAE9 /* TensorSwiftTests-tvOS */ = { + "______Target_TensorSwiftTests" /* TensorSwiftTests */ = { isa = PBXNativeTarget; - buildConfigurationList = D6CE6CB31CEED72F004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwiftTests-tvOS" */; + buildConfigurationList = "_______Confs_TensorSwiftTests" /* Build configuration list for PBXNativeTarget "TensorSwiftTests" */; buildPhases = ( - D6CE6CA41CEED72F004EAAE9 /* Sources */, - D6CE6CA51CEED72F004EAAE9 /* Frameworks */, - D6CE6CA61CEED72F004EAAE9 /* Resources */, + CompilePhase_TensorSwiftTests /* Sources */, + "___LinkPhase_TensorSwiftTests" /* Frameworks */, ); buildRules = ( ); dependencies = ( - D6CE6CAB1CEED72F004EAAE9 /* PBXTargetDependency */, + __Dependency_TensorSwift /* PBXTargetDependency */, ); - name = "TensorSwiftTests-tvOS"; - productName = "TensorSwift-tvOSTests"; - productReference = D6CE6CA81CEED72F004EAAE9 /* TensorSwiftTests.xctest */; + name = TensorSwiftTests; + productName = TensorSwiftTests; + productReference = "_____Product_TensorSwiftTests" /* TensorSwiftTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - D6CE6CBA1CEED740004EAAE9 /* TensorSwift-watchOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6CE6CC01CEED740004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwift-watchOS" */; - buildPhases = ( - D6CE6CB61CEED740004EAAE9 /* Sources */, - D6CE6CB71CEED740004EAAE9 /* Frameworks */, - D6CE6CB81CEED740004EAAE9 /* Headers */, - D6CE6CB91CEED740004EAAE9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "TensorSwift-watchOS"; - productName = "TensorSwift-watchOS"; - productReference = D6CE6CBB1CEED740004EAAE9 /* TensorSwift.framework */; - productType = "com.apple.product-type.framework"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - D69C33DC1C8D731C007985D4 /* Project object */ = { + __RootObject_ /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "Qoncept, Inc."; + LastSwiftUpdateCheck = 0800; + LastUpgradeCheck = 9999; TargetAttributes = { - D63F30001C996F4100B88E12 = { - CreatedOnToolsVersion = 7.2.1; - }; - D63F30131C996F4200B88E12 = { - CreatedOnToolsVersion = 7.2.1; - TestTargetID = D63F30001C996F4100B88E12; - }; - D69C33E41C8D731C007985D4 = { - CreatedOnToolsVersion = 7.2.1; + A7C387A51D9F604900091506 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = 3B8C483UAP; + ProvisioningStyle = Automatic; }; - D69C33EE1C8D731C007985D4 = { - CreatedOnToolsVersion = 7.2.1; + A7C387B81D9F604900091506 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = 3B8C483UAP; + ProvisioningStyle = Automatic; + TestTargetID = A7C387A51D9F604900091506; }; - D6CE6C821CEED6F7004EAAE9 = { - CreatedOnToolsVersion = 7.3; + A7C387C31D9F604A00091506 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = 3B8C483UAP; + ProvisioningStyle = Automatic; + TestTargetID = A7C387A51D9F604900091506; }; - D6CE6C8B1CEED6F8004EAAE9 = { - CreatedOnToolsVersion = 7.3; - }; - D6CE6C9E1CEED72F004EAAE9 = { - CreatedOnToolsVersion = 7.3; - }; - D6CE6CA71CEED72F004EAAE9 = { - CreatedOnToolsVersion = 7.3; - }; - D6CE6CBA1CEED740004EAAE9 = { - CreatedOnToolsVersion = 7.3; + "______Target_TensorSwiftTests" = { + LastSwiftMigration = 0800; }; }; }; - buildConfigurationList = D69C33DF1C8D731C007985D4 /* Build configuration list for PBXProject "TensorSwift" */; + buildConfigurationList = "___RootConfs_" /* Build configuration list for PBXProject "TensorSwift" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -628,101 +483,47 @@ en, Base, ); - mainGroup = D69C33DB1C8D731C007985D4; - productRefGroup = D69C33E61C8D731C007985D4 /* Products */; + mainGroup = "___RootGroup_"; + productRefGroup = "____Products_" /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - D69C33E41C8D731C007985D4 /* TensorSwift-iOS */, - D69C33EE1C8D731C007985D4 /* TensorSwiftTests-iOS */, - D6CE6C821CEED6F7004EAAE9 /* TensorSwift-OSX */, - D6CE6C8B1CEED6F8004EAAE9 /* TensorSwiftTests-OSX */, - D6CE6C9E1CEED72F004EAAE9 /* TensorSwift-tvOS */, - D6CE6CA71CEED72F004EAAE9 /* TensorSwiftTests-tvOS */, - D6CE6CBA1CEED740004EAAE9 /* TensorSwift-watchOS */, - D63F30001C996F4100B88E12 /* MNIST */, - D63F30131C996F4200B88E12 /* MNISTTests */, + "______Target_TensorSwift" /* TensorSwift */, + "______Target_TensorSwiftTests" /* TensorSwiftTests */, + A7C387A51D9F604900091506 /* MNIST */, + A7C387B81D9F604900091506 /* MNISTTests */, + A7C387C31D9F604A00091506 /* MNISTUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - D63F2FFF1C996F4100B88E12 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6312E5D1CE4397500985B92 /* W_fc2 in Resources */, - D6312E531CE4397500985B92 /* b_fc1 in Resources */, - D6312E5B1CE4397500985B92 /* W_fc1 in Resources */, - D6312E551CE4397500985B92 /* b_fc2 in Resources */, - D6312E511CE4397500985B92 /* b_conv2 in Resources */, - D6312E591CE4397500985B92 /* W_conv2 in Resources */, - D63F300E1C996F4200B88E12 /* LaunchScreen.storyboard in Resources */, - D6312E571CE4397500985B92 /* W_conv1 in Resources */, - D63F300B1C996F4200B88E12 /* Assets.xcassets in Resources */, - D63F30091C996F4200B88E12 /* Main.storyboard in Resources */, - D6312E4F1CE4397500985B92 /* b_conv1 in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D63F30121C996F4200B88E12 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6312E581CE4397500985B92 /* W_conv1 in Resources */, - D6312E541CE4397500985B92 /* b_fc1 in Resources */, - D6312E561CE4397500985B92 /* b_fc2 in Resources */, - D6312E5A1CE4397500985B92 /* W_conv2 in Resources */, - D6312E521CE4397500985B92 /* b_conv2 in Resources */, - D6312E5C1CE4397500985B92 /* W_fc1 in Resources */, - D6312E5E1CE4397500985B92 /* W_fc2 in Resources */, - D6312E501CE4397500985B92 /* b_conv1 in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D69C33E31C8D731C007985D4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D69C33ED1C8D731C007985D4 /* Resources */ = { + A7C387A41D9F604900091506 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + A7C387FE1D9F616600091506 /* W_fc2 in Resources */, + A7C387F91D9F616600091506 /* b_fc1 in Resources */, + A7C387FD1D9F616600091506 /* W_fc1 in Resources */, + A7C387FA1D9F616600091506 /* b_fc2 in Resources */, + A7C387F81D9F616600091506 /* b_conv2 in Resources */, + A7C387FC1D9F616600091506 /* W_conv2 in Resources */, + A7C387B31D9F604900091506 /* LaunchScreen.storyboard in Resources */, + A7C387FB1D9F616600091506 /* W_conv1 in Resources */, + A7C387B01D9F604900091506 /* Assets.xcassets in Resources */, + A7C387AE1D9F604900091506 /* Main.storyboard in Resources */, + A7C387F71D9F616600091506 /* b_conv1 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - D6CE6C811CEED6F7004EAAE9 /* Resources */ = { + A7C387B71D9F604900091506 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - D6CE6C8A1CEED6F8004EAAE9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6CE6C9D1CEED72F004EAAE9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6CE6CA61CEED72F004EAAE9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6CE6CB91CEED740004EAAE9 /* Resources */ = { + A7C387C21D9F604A00091506 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -732,168 +533,108 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - D63F2FFD1C996F4100B88E12 /* Sources */ = { + A7C387A21D9F604900091506 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D63F30061C996F4100B88E12 /* ViewController.swift in Sources */, - D6312E6E1CE486A700985B92 /* CanvasView.swift in Sources */, - D6312E411CE33BB700985B92 /* Classifier.swift in Sources */, - D6312E451CE4351100985B92 /* String.swift in Sources */, - D63F30041C996F4100B88E12 /* AppDelegate.swift in Sources */, - D6312E6A1CE484FE00985B92 /* Line.swift in Sources */, - D6312E6C1CE4852800985B92 /* Canvas.swift in Sources */, + A7C387DB1D9F60F100091506 /* Classifier.swift in Sources */, + A7C387AB1D9F604900091506 /* ViewController.swift in Sources */, + A7C387A91D9F604900091506 /* AppDelegate.swift in Sources */, + A7C387DC1D9F60F100091506 /* Line.swift in Sources */, + A7C387DD1D9F60F100091506 /* String.swift in Sources */, + A7C387DA1D9F60F100091506 /* CanvasView.swift in Sources */, + A7C387D91D9F60F100091506 /* Canvas.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - D63F30101C996F4200B88E12 /* Sources */ = { + A7C387B51D9F604900091506 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D6D5D4BA1CA24E7C0041BE85 /* Downloader.swift in Sources */, - 273614FA1CB3E72200CF4935 /* SHA1.swift in Sources */, - D6312E431CE4341500985B92 /* ClassifierTest.swift in Sources */, - D6312E631CE4699D00985B92 /* Array.swift in Sources */, - D6F63B0D1CB7593000F3C82E /* DownloaderTest.swift in Sources */, - D63F30191C996F4200B88E12 /* MNISTTest.swift in Sources */, + A7C387BE1D9F604900091506 /* MNISTTests.swift in Sources */, + A7C387EC1D9F614F00091506 /* DownloaderTests.swift in Sources */, + A7C387ED1D9F614F00091506 /* SHA1.swift in Sources */, + A7C387E91D9F614E00091506 /* Array.swift in Sources */, + A7C387EB1D9F614E00091506 /* Downloader.swift in Sources */, + A7C387EA1D9F614E00091506 /* ClassifierTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - D69C33E01C8D731C007985D4 /* Sources */ = { + A7C387C01D9F604A00091506 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D69C34001C8D735C007985D4 /* Tensor.swift in Sources */, - D69C34081C8E7D03007985D4 /* Operators.swift in Sources */, - D69C340C1C8E85D0007985D4 /* TensorNN.swift in Sources */, - D66E2A931CCDD3C700859630 /* Utils.swift in Sources */, - D69C34021C8D7435007985D4 /* Shape.swift in Sources */, - D69C34041C8D7487007985D4 /* Dimension.swift in Sources */, - D69C340A1C8E7D44007985D4 /* TensorMath.swift in Sources */, + A7C387C91D9F604A00091506 /* MNISTUITests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - D69C33EB1C8D731C007985D4 /* Sources */ = { + CompilePhase_TensorSwift /* Sources */ = { isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( - D69C34111C8ED4FD007985D4 /* TensorNNTest.swift in Sources */, - D6312E701CE5D7BB00985B92 /* DimensionTest.swift in Sources */, - A7E021DB1CAA4B2F00BAFC54 /* CalculationPerformanceTests.swift in Sources */, - D69C34061C8D8F87007985D4 /* TensorSwiftSample.swift in Sources */, - D69C33F51C8D731C007985D4 /* TensorTest.swift in Sources */, + __src_cc_ref_Sources/Dimension.swift /* Dimension.swift in Sources */, + __src_cc_ref_Sources/Operators.swift /* Operators.swift in Sources */, + __src_cc_ref_Sources/Shape.swift /* Shape.swift in Sources */, + __src_cc_ref_Sources/Tensor.swift /* Tensor.swift in Sources */, + __src_cc_ref_Sources/TensorMath.swift /* TensorMath.swift in Sources */, + __src_cc_ref_Sources/TensorNN.swift /* TensorNN.swift in Sources */, + __src_cc_ref_Sources/Utils.swift /* Utils.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - D6CE6C7E1CEED6F7004EAAE9 /* Sources */ = { + CompilePhase_TensorSwiftTests /* Sources */ = { isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( - D6CE6CC51CEED89B004EAAE9 /* TensorMath.swift in Sources */, - D6CE6CC41CEED89B004EAAE9 /* Tensor.swift in Sources */, - D6CE6CC61CEED89B004EAAE9 /* TensorNN.swift in Sources */, - D6CE6CCA1CEED89B004EAAE9 /* Utils.swift in Sources */, - D6CE6CC81CEED89B004EAAE9 /* Dimension.swift in Sources */, - D6CE6CC71CEED89B004EAAE9 /* Shape.swift in Sources */, - D6CE6CC91CEED89B004EAAE9 /* Operators.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6CE6C881CEED6F8004EAAE9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6CE6CDE1CEED8AD004EAAE9 /* CalculationPerformanceTests.swift in Sources */, - D6CE6CDC1CEED8AD004EAAE9 /* TensorNNTest.swift in Sources */, - D6CE6CDB1CEED8AD004EAAE9 /* TensorTest.swift in Sources */, - D6CE6CDD1CEED8AD004EAAE9 /* DimensionTest.swift in Sources */, - D6CE6CDF1CEED8AD004EAAE9 /* TensorSwiftSample.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6CE6C9A1CEED72F004EAAE9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6CE6CCD1CEED89C004EAAE9 /* TensorMath.swift in Sources */, - D6CE6CCC1CEED89C004EAAE9 /* Tensor.swift in Sources */, - D6CE6CCE1CEED89C004EAAE9 /* TensorNN.swift in Sources */, - D6CE6CD21CEED89C004EAAE9 /* Utils.swift in Sources */, - D6CE6CD01CEED89C004EAAE9 /* Dimension.swift in Sources */, - D6CE6CCF1CEED89C004EAAE9 /* Shape.swift in Sources */, - D6CE6CD11CEED89C004EAAE9 /* Operators.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6CE6CA41CEED72F004EAAE9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6CE6CE31CEED8AF004EAAE9 /* CalculationPerformanceTests.swift in Sources */, - D6CE6CE11CEED8AF004EAAE9 /* TensorNNTest.swift in Sources */, - D6CE6CE01CEED8AF004EAAE9 /* TensorTest.swift in Sources */, - D6CE6CE21CEED8AF004EAAE9 /* DimensionTest.swift in Sources */, - D6CE6CE41CEED8AF004EAAE9 /* TensorSwiftSample.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6CE6CB61CEED740004EAAE9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6CE6CD51CEED89D004EAAE9 /* TensorMath.swift in Sources */, - D6CE6CD41CEED89D004EAAE9 /* Tensor.swift in Sources */, - D6CE6CD61CEED89D004EAAE9 /* TensorNN.swift in Sources */, - D6CE6CDA1CEED89D004EAAE9 /* Utils.swift in Sources */, - D6CE6CD81CEED89D004EAAE9 /* Dimension.swift in Sources */, - D6CE6CD71CEED89D004EAAE9 /* Shape.swift in Sources */, - D6CE6CD91CEED89D004EAAE9 /* Operators.swift in Sources */, + A7C046091D9F514600FAF16F /* TensorSwiftTests.swift in Sources */, + A7C0460A1D9F514600FAF16F /* CalculationPerformanceTests.swift in Sources */, + A7C0460B1D9F514600FAF16F /* DimensionTests.swift in Sources */, + A7C0460C1D9F514600FAF16F /* PowerTests.swift in Sources */, + D646CEF61DBE1A25003E8A59 /* TensorMathTest.swift in Sources */, + A7C0460D1D9F514600FAF16F /* TensorNNTests.swift in Sources */, + A7C0460E1D9F514600FAF16F /* TensorSwiftSample.swift in Sources */, + A7C0460F1D9F514600FAF16F /* TensorTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - D6312E671CE46BDE00985B92 /* PBXTargetDependency */ = { + A7C387BB1D9F604900091506 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = D69C33E41C8D731C007985D4 /* TensorSwift-iOS */; - targetProxy = D6312E661CE46BDE00985B92 /* PBXContainerItemProxy */; + target = A7C387A51D9F604900091506 /* MNIST */; + targetProxy = A7C387BA1D9F604900091506 /* PBXContainerItemProxy */; }; - D63F30161C996F4200B88E12 /* PBXTargetDependency */ = { + A7C387C61D9F604A00091506 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = D63F30001C996F4100B88E12 /* MNIST */; - targetProxy = D63F30151C996F4200B88E12 /* PBXContainerItemProxy */; + target = A7C387A51D9F604900091506 /* MNIST */; + targetProxy = A7C387C51D9F604A00091506 /* PBXContainerItemProxy */; }; - D69C33F21C8D731C007985D4 /* PBXTargetDependency */ = { + A7C387E11D9F611D00091506 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = D69C33E41C8D731C007985D4 /* TensorSwift-iOS */; - targetProxy = D69C33F11C8D731C007985D4 /* PBXContainerItemProxy */; + target = "______Target_TensorSwift" /* TensorSwift */; + targetProxy = A7C387E01D9F611D00091506 /* PBXContainerItemProxy */; }; - D6CE6C8F1CEED6F8004EAAE9 /* PBXTargetDependency */ = { + __Dependency_TensorSwift /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = D6CE6C821CEED6F7004EAAE9 /* TensorSwift-OSX */; - targetProxy = D6CE6C8E1CEED6F8004EAAE9 /* PBXContainerItemProxy */; - }; - D6CE6CAB1CEED72F004EAAE9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D6CE6C9E1CEED72F004EAAE9 /* TensorSwift-tvOS */; - targetProxy = D6CE6CAA1CEED72F004EAAE9 /* PBXContainerItemProxy */; + target = "______Target_TensorSwift" /* TensorSwift */; + targetProxy = A7DF6EB61D9A1AC40097CEB7 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - D63F30071C996F4200B88E12 /* Main.storyboard */ = { + A7C387AC1D9F604900091506 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - D63F30081C996F4200B88E12 /* Base */, + A7C387AD1D9F604900091506 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; - D63F300C1C996F4200B88E12 /* LaunchScreen.storyboard */ = { + A7C387B11D9F604900091506 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - D63F300D1C996F4200B88E12 /* Base */, + A7C387B21D9F604900091506 /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -901,62 +642,232 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - D63F301B1C996F4200B88E12 /* Debug */ = { + A7C387CB1D9F604A00091506 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = 3B8C483UAP; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = MNIST/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.MNIST; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - D63F301C1C996F4200B88E12 /* Release */ = { + A7C387CC1D9F604A00091506 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 3B8C483UAP; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = MNIST/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.MNIST; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; }; name = Release; }; - D63F301D1C996F4200B88E12 /* Debug */ = { + A7C387CD1D9F604A00091506 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = 3B8C483UAP; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = MNISTTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.MNISTTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_INCLUDE_PATHS = ./zlib; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OBJC_BRIDGING_HEADER = "MNISTTests/MNISTTests-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MNIST.app/MNIST"; }; name = Debug; }; - D63F301E1C996F4200B88E12 /* Release */ = { + A7C387CE1D9F604A00091506 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 3B8C483UAP; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = MNISTTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.MNISTTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_INCLUDE_PATHS = ./zlib; + SDKROOT = iphoneos; SWIFT_OBJC_BRIDGING_HEADER = "MNISTTests/MNISTTests-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MNIST.app/MNIST"; + VALIDATE_PRODUCT = YES; }; name = Release; }; - D69C33F71C8D731C007985D4 /* Debug */ = { + A7C387CF1D9F604A00091506 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -964,16 +875,19 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = 3B8C483UAP; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -990,22 +904,27 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.9; + INFOPLIST_FILE = MNISTUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.MNISTUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + SWIFT_VERSION = 3.0; + TEST_TARGET_NAME = MNIST; }; name = Debug; }; - D69C33F81C8D731C007985D4 /* Release */ = { + A7C387D01D9F604A00091506 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -1013,16 +932,19 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 3B8C483UAP; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -1033,348 +955,155 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.9; + INFOPLIST_FILE = MNISTUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.MNISTUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - D69C33FA1C8D731C007985D4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = TensorSwift/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwift; - PRODUCT_NAME = TensorSwift; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - }; - name = Debug; - }; - D69C33FB1C8D731C007985D4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = TensorSwift/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwift; - PRODUCT_NAME = TensorSwift; - SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + TEST_TARGET_NAME = MNIST; + VALIDATE_PRODUCT = YES; }; name = Release; }; - D69C33FD1C8D731C007985D4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = TensorSwiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwiftTests; - PRODUCT_NAME = TensorSwiftTests; - }; - name = Debug; - }; - D69C33FE1C8D731C007985D4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = TensorSwiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwiftTests; - PRODUCT_NAME = TensorSwiftTests; - }; - name = Release; - }; - D6CE6C941CEED6F8004EAAE9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = TensorSwift/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwift; - PRODUCT_NAME = TensorSwift; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - D6CE6C951CEED6F8004EAAE9 /* Release */ = { + _ReleaseConf_TensorSwift /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = TensorSwift/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwift; - PRODUCT_NAME = TensorSwift; - SDKROOT = macosx; - SKIP_INSTALL = YES; + DEVELOPMENT_TEAM = 3B8C483UAP; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks"; + INFOPLIST_FILE = TensorSwift.xcodeproj/TensorSwift_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = TensorSwift; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SWIFT_VERSION = 3.0; }; name = Release; }; - D6CE6C961CEED6F8004EAAE9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CODE_SIGN_IDENTITY = "-"; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = TensorSwiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwiftTests; - PRODUCT_NAME = TensorSwiftTests; - SDKROOT = macosx; - }; - name = Debug; - }; - D6CE6C971CEED6F8004EAAE9 /* Release */ = { + _ReleaseConf_TensorSwiftTests /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CODE_SIGN_IDENTITY = "-"; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = TensorSwiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwiftTests; - PRODUCT_NAME = TensorSwiftTests; - SDKROOT = macosx; + CLANG_ENABLE_MODULES = YES; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks"; + INFOPLIST_FILE = TensorSwift.xcodeproj/TensorSwiftTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_VERSION = 3.0; }; name = Release; }; - D6CE6CB11CEED72F004EAAE9 /* Debug */ = { + "___DebugConf_TensorSwift" /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = TensorSwift/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwift; - PRODUCT_NAME = TensorSwift; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; + DEVELOPMENT_TEAM = ""; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks"; + INFOPLIST_FILE = TensorSwift.xcodeproj/TensorSwift_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = TensorSwift; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; }; name = Debug; }; - D6CE6CB21CEED72F004EAAE9 /* Release */ = { + "___DebugConf_TensorSwiftTests" /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = TensorSwift/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwift; - PRODUCT_NAME = TensorSwift; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Release; - }; - D6CE6CB41CEED72F004EAAE9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - INFOPLIST_FILE = TensorSwiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwiftTests; - PRODUCT_NAME = TensorSwiftTests; - SDKROOT = appletvos; - TVOS_DEPLOYMENT_TARGET = 9.2; + CLANG_ENABLE_MODULES = YES; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks"; + INFOPLIST_FILE = TensorSwift.xcodeproj/TensorSwiftTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; }; name = Debug; }; - D6CE6CB51CEED72F004EAAE9 /* Release */ = { + "_____Release_" /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = __PBXFileRef_TensorSwift.xcodeproj/Configs/Project.xcconfig /* TensorSwift.xcodeproj/Configs/Project.xcconfig */; buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - INFOPLIST_FILE = TensorSwiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwiftTests; - PRODUCT_NAME = TensorSwiftTests; - SDKROOT = appletvos; - TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Release; }; - D6CE6CC11CEED740004EAAE9 /* Debug */ = { + "_______Debug_" /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = __PBXFileRef_TensorSwift.xcodeproj/Configs/Project.xcconfig /* TensorSwift.xcodeproj/Configs/Project.xcconfig */; buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ANALYZER_NONNULL = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = TensorSwift/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwift; - PRODUCT_NAME = TensorSwift; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.2; }; name = Debug; }; - D6CE6CC21CEED740004EAAE9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ANALYZER_NONNULL = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = TensorSwift/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = jp.co.qoncept.TensorSwift; - PRODUCT_NAME = TensorSwift; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.2; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - D63F301F1C996F4200B88E12 /* Build configuration list for PBXNativeTarget "MNIST" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D63F301B1C996F4200B88E12 /* Debug */, - D63F301C1C996F4200B88E12 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D63F30201C996F4200B88E12 /* Build configuration list for PBXNativeTarget "MNISTTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D63F301D1C996F4200B88E12 /* Debug */, - D63F301E1C996F4200B88E12 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D69C33DF1C8D731C007985D4 /* Build configuration list for PBXProject "TensorSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D69C33F71C8D731C007985D4 /* Debug */, - D69C33F81C8D731C007985D4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D69C33F91C8D731C007985D4 /* Build configuration list for PBXNativeTarget "TensorSwift-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D69C33FA1C8D731C007985D4 /* Debug */, - D69C33FB1C8D731C007985D4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D69C33FC1C8D731C007985D4 /* Build configuration list for PBXNativeTarget "TensorSwiftTests-iOS" */ = { + A7C387D11D9F604A00091506 /* Build configuration list for PBXNativeTarget "MNIST" */ = { isa = XCConfigurationList; buildConfigurations = ( - D69C33FD1C8D731C007985D4 /* Debug */, - D69C33FE1C8D731C007985D4 /* Release */, + A7C387CB1D9F604A00091506 /* Debug */, + A7C387CC1D9F604A00091506 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; }; - D6CE6C981CEED6F8004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwift-OSX" */ = { + A7C387D21D9F604A00091506 /* Build configuration list for PBXNativeTarget "MNISTTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - D6CE6C941CEED6F8004EAAE9 /* Debug */, - D6CE6C951CEED6F8004EAAE9 /* Release */, + A7C387CD1D9F604A00091506 /* Debug */, + A7C387CE1D9F604A00091506 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; }; - D6CE6C991CEED6F8004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwiftTests-OSX" */ = { + A7C387D31D9F604A00091506 /* Build configuration list for PBXNativeTarget "MNISTUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( - D6CE6C961CEED6F8004EAAE9 /* Debug */, - D6CE6C971CEED6F8004EAAE9 /* Release */, + A7C387CF1D9F604A00091506 /* Debug */, + A7C387D01D9F604A00091506 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; }; - D6CE6CB01CEED72F004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwift-tvOS" */ = { + "___RootConfs_" /* Build configuration list for PBXProject "TensorSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - D6CE6CB11CEED72F004EAAE9 /* Debug */, - D6CE6CB21CEED72F004EAAE9 /* Release */, + "_______Debug_" /* Debug */, + "_____Release_" /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; - D6CE6CB31CEED72F004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwiftTests-tvOS" */ = { + "_______Confs_TensorSwift" /* Build configuration list for PBXNativeTarget "TensorSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - D6CE6CB41CEED72F004EAAE9 /* Debug */, - D6CE6CB51CEED72F004EAAE9 /* Release */, + "___DebugConf_TensorSwift" /* Debug */, + _ReleaseConf_TensorSwift /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; - D6CE6CC01CEED740004EAAE9 /* Build configuration list for PBXNativeTarget "TensorSwift-watchOS" */ = { + "_______Confs_TensorSwiftTests" /* Build configuration list for PBXNativeTarget "TensorSwiftTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - D6CE6CC11CEED740004EAAE9 /* Debug */, - D6CE6CC21CEED740004EAAE9 /* Release */, + "___DebugConf_TensorSwiftTests" /* Debug */, + _ReleaseConf_TensorSwiftTests /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = D69C33DC1C8D731C007985D4 /* Project object */; + rootObject = __RootObject_ /* Project object */; } diff --git a/TensorSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TensorSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata index aa32b76..919434a 100644 --- a/TensorSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/TensorSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/TensorSwift.xcodeproj/project.xcworkspace/xcshareddata/TensorSwift.xcscmblueprint b/TensorSwift.xcodeproj/project.xcworkspace/xcshareddata/TensorSwift.xcscmblueprint deleted file mode 100644 index ccf289f..0000000 --- a/TensorSwift.xcodeproj/project.xcworkspace/xcshareddata/TensorSwift.xcscmblueprint +++ /dev/null @@ -1,30 +0,0 @@ -{ - "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "CCDC2BEAB93820BE1DDD6D36F8B9D2CF4E8BD09E", - "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { - - }, - "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { - "CCDC2BEAB93820BE1DDD6D36F8B9D2CF4E8BD09E" : 0, - "18D6DCF80925D0A5F4A2E9949DF09AF85B0E1068" : 0 - }, - "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "0556DE8C-97B0-412A-B88B-E9D3D6B8C28F", - "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { - "CCDC2BEAB93820BE1DDD6D36F8B9D2CF4E8BD09E" : "TensorSwift\/", - "18D6DCF80925D0A5F4A2E9949DF09AF85B0E1068" : ".." - }, - "DVTSourceControlWorkspaceBlueprintNameKey" : "TensorSwift", - "DVTSourceControlWorkspaceBlueprintVersion" : 204, - "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "TensorSwift.xcodeproj", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "ghe.qar.jp:qoncept\/osaka-station-navi-demo.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "18D6DCF80925D0A5F4A2E9949DF09AF85B0E1068" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:qoncept\/TensorSwift.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "CCDC2BEAB93820BE1DDD6D36F8B9D2CF4E8BD09E" - } - ] -} \ No newline at end of file diff --git a/TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift-iOS.xcscheme b/TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift-iOS.xcscheme deleted file mode 100644 index c2a4340..0000000 --- a/TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift-iOS.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift-OSX.xcscheme b/TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift.xcscheme similarity index 84% rename from TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift-OSX.xcscheme rename to TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift.xcscheme index a8c1533..e882410 100644 --- a/TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift-OSX.xcscheme +++ b/TensorSwift.xcodeproj/xcshareddata/xcschemes/TensorSwift.xcscheme @@ -1,6 +1,6 @@ @@ -32,9 +32,9 @@ skipped = "NO"> @@ -42,9 +42,9 @@ @@ -64,9 +64,9 @@ @@ -82,9 +82,9 @@ diff --git a/TensorSwift/Operators.swift b/TensorSwift/Operators.swift deleted file mode 100644 index 20818ae..0000000 --- a/TensorSwift/Operators.swift +++ /dev/null @@ -1 +0,0 @@ -infix operator ** { associativity left precedence 170 } \ No newline at end of file diff --git a/TensorSwiftTests/DimensionTest.swift b/TensorSwiftTests/DimensionTest.swift deleted file mode 100644 index f4908bb..0000000 --- a/TensorSwiftTests/DimensionTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -import XCTest -@testable import TensorSwift - -class DimensionTest: XCTestCase { - func testAdd() { - do { - let a: Dimension = 2 - let b: Dimension = 3 - XCTAssertEqual(a + b, 5) - } - } - - func testSub() { - do { - let a: Dimension = 3 - let b: Dimension = 2 - XCTAssertEqual(a - b, 1) - } - } - - func testMul() { - do { - let a: Dimension = 2 - let b: Dimension = 3 - XCTAssertEqual(a * b, 6) - } - } - - func testDiv() { - do { - let a: Dimension = 6 - let b: Dimension = 2 - XCTAssertEqual(a / b, 3) - } - } -} \ No newline at end of file diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..ea0b66e --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,12 @@ +import XCTest +@testable import TensorSwiftTests + +XCTMain([ + testCase(TensorSwiftTests.allTests), + testCase(DimensionTests.allTests), + testCase(PowerTests.allTests), + testCase(TensorTests.allTests), + testCase(TensorNNTests.allTests), + testCase(CalculationPerformanceTests.allTests), + testCase(TensorSwiftSample.allTests), +]) diff --git a/TensorSwiftTests/CalculationPerformanceTests.swift b/Tests/TensorSwiftTests/CalculationPerformanceTests.swift similarity index 68% rename from TensorSwiftTests/CalculationPerformanceTests.swift rename to Tests/TensorSwiftTests/CalculationPerformanceTests.swift index 68b166d..53e7c18 100644 --- a/TensorSwiftTests/CalculationPerformanceTests.swift +++ b/Tests/TensorSwiftTests/CalculationPerformanceTests.swift @@ -2,19 +2,19 @@ import XCTest @testable import TensorSwift private func getTensor1000x1000() -> Tensor { - let elements = [Float](count: 1000*1000 ,repeatedValue:0.1) + let elements = [Float](repeating: 0.1 ,count: 1000*1000) return Tensor(shape: [1000, 1000], elements: elements) } private func getTensor1x1000() -> Tensor { - let elements = [Float](count: 1000, repeatedValue: 0) + let elements = [Float](repeating: 0, count: 1000) return Tensor(shape: [1, 1000], elements: elements) } -class CalculationPerformanceTest : XCTestCase { +class CalculationPerformanceTests : XCTestCase { func testElementAccess(){ let W = getTensor1000x1000() - measureBlock{ + measure{ for _ in 0..<100000{ let _ = W[500,500] } @@ -23,7 +23,7 @@ class CalculationPerformanceTest : XCTestCase { func testElementAccessRaw(){ let W = getTensor1000x1000() - measureBlock{ + measure{ for _ in 0..<100000{ let _ = W.elements[500*W.shape.dimensions[1].value + 500] } @@ -34,7 +34,7 @@ class CalculationPerformanceTest : XCTestCase { let W = getTensor1000x1000() let x = getTensor1x1000() - measureBlock{ + measure{ let _ = x.matmul(W) } } @@ -43,11 +43,11 @@ class CalculationPerformanceTest : XCTestCase { let W = getTensor1000x1000() let x = getTensor1x1000() - measureBlock{ + measure{ let xRow = x.shape.dimensions[0].value let WRow = W.shape.dimensions[0].value let WColumn = W.shape.dimensions[1].value - var elements = [Float](count: 1000, repeatedValue: 0) + var elements = [Float](repeating: 0, count: 1000) for r in 0.. () throws -> Void)] { + return [ + ("testElementAccess", testElementAccess), + ("testElementAccessRaw", testElementAccessRaw), + ("testElementMultiplication", testMultiplication), + ("testElementMultiplicationRaw", testMultiplicationRaw), + ] + } +} diff --git a/Tests/TensorSwiftTests/DimensionTests.swift b/Tests/TensorSwiftTests/DimensionTests.swift new file mode 100644 index 0000000..152e23c --- /dev/null +++ b/Tests/TensorSwiftTests/DimensionTests.swift @@ -0,0 +1,46 @@ +import XCTest +@testable import TensorSwift + +class DimensionTests: XCTestCase { + func testAdd() { + do { + let a = Dimension(2) + let b = Dimension(3) + XCTAssertEqual(a + b, 5) + } + } + + func testSub() { + do { + + let a = Dimension(3) + let b = Dimension(2) + XCTAssertEqual(a - b, 1) + } + } + + func testMul() { + do { + let a = Dimension(2) + let b = Dimension(3) + XCTAssertEqual(a * b, 6) + } + } + + func testDiv() { + do { + let a = Dimension(6) + let b = Dimension(2) + XCTAssertEqual(a / b, 3) + } + } + + static var allTests : [(String, (DimensionTests) -> () throws -> Void)] { + return [ + ("testAdd", testAdd), + ("testSub", testSub), + ("testMul", testMul), + ("testDiv", testDiv), + ] + } +} diff --git a/TensorSwiftTests/Info.plist b/Tests/TensorSwiftTests/Info.plist similarity index 100% rename from TensorSwiftTests/Info.plist rename to Tests/TensorSwiftTests/Info.plist diff --git a/Tests/TensorSwiftTests/PowerTests.swift b/Tests/TensorSwiftTests/PowerTests.swift new file mode 100644 index 0000000..a709d0e --- /dev/null +++ b/Tests/TensorSwiftTests/PowerTests.swift @@ -0,0 +1,32 @@ +import XCTest +@testable import TensorSwift + +class PowerTests: XCTestCase { + + func testScalar() { + let tensor = Tensor(shape: [2, 2], elements: [1, 2, 3, 4]) + let scalar = Tensor.Element(2) + + XCTAssertEqual(tensor ** scalar, Tensor(shape: [2, 2], elements: [1, 4, 9, 16])) + XCTAssertEqual(scalar ** tensor, Tensor(shape: [2, 2], elements: [2, 4, 8, 16])) + + XCTAssertEqual(scalar ** tensor ** scalar, Tensor(shape: [2, 2], elements: [2, 16, 512, 65536])) + } + + func testMatrices() { + let tensor = Tensor(shape: [2, 2], elements: [1, 2, 3, 4]) + let tensor2 = Tensor(shape: [2, 2], elements: [2, 2, 2, 2]) + + XCTAssertEqual(tensor ** tensor2, Tensor(shape: [2, 2], elements: [1, 4, 9, 16])) + XCTAssertEqual(tensor ** tensor, Tensor(shape: [2, 2], elements: [1, 4, 27, 256])) + + XCTAssertEqual(tensor ** tensor2 ** tensor, Tensor(shape: [2, 2], elements: [1, 16, pow(3, 8), pow(4, 16)])) + } + + static var allTests : [(String, (PowerTests) -> () throws -> Void)] { + return [ + ("testScalar", testScalar), + ("testMatrices", testMatrices), + ] + } +} diff --git a/Tests/TensorSwiftTests/TensorMathTest.swift b/Tests/TensorSwiftTests/TensorMathTest.swift new file mode 100644 index 0000000..e03f710 --- /dev/null +++ b/Tests/TensorSwiftTests/TensorMathTest.swift @@ -0,0 +1,34 @@ +import XCTest +@testable import TensorSwift + +class TensorMathTest: XCTestCase { + func testPow() { + do { + let a = Tensor(shape: [2, 3], elements: [1, 2, 3, 4, 5, 6]) + let b = Tensor(shape: [2, 3], elements: [6, 5, 4, 3, 2, 1]) + XCTAssertEqual(a ** b, Tensor(shape: [2, 3], elements: [1, 32, 81, 64, 25, 6])) + XCTAssertEqual(b ** a, Tensor(shape: [2, 3], elements: [6, 25, 64, 81, 32, 1])) + } + + do { + let a = Tensor(shape: [2, 3, 2], elements: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) + let b = Tensor(shape: [2], elements: [2, 3]) + XCTAssertEqual(a ** b, Tensor(shape: [2, 3, 2], elements: [1, 8, 9, 64, 25, 216, 49, 512, 81, 1000, 121, 1728])) + XCTAssertEqual(b ** a, Tensor(shape: [2, 3, 2], elements: [2, 9, 8, 81, 32, 729, 128, 6561, 512, 59049, 2048, 531441])) + } + + do { + let a = Tensor(shape: [2, 1, 3, 2], elements: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) + let b = Tensor(shape: [3, 2], elements: [6, 5, 4, 3, 2, 1]) + XCTAssertEqual(a ** b, Tensor(shape: [2, 1, 3, 2], elements: [1, 32, 81, 64, 25, 6, 117649, 32768, 6561, 1000, 121, 12])) + XCTAssertEqual(b ** a, Tensor(shape: [2, 1, 3, 2], elements: [6, 25, 64, 81, 32, 1, 279936, 390625, 262144, 59049, 2048, 1])) + } + + do { + let a = Tensor(shape: [2, 3], elements: [1, 2, 3, 4, 5, 6]) + let b: Float = 2.0 + XCTAssertEqual(a ** b, Tensor(shape: [2, 3], elements: [1, 4, 9, 16, 25, 36])) + XCTAssertEqual(b ** a, Tensor(shape: [2, 3], elements: [2, 4, 8, 16, 32, 64])) + } + } +} \ No newline at end of file diff --git a/TensorSwiftTests/TensorNNTest.swift b/Tests/TensorSwiftTests/TensorNNTests.swift similarity index 85% rename from TensorSwiftTests/TensorNNTest.swift rename to Tests/TensorSwiftTests/TensorNNTests.swift index 079ce6f..69781b2 100644 --- a/TensorSwiftTests/TensorNNTest.swift +++ b/Tests/TensorSwiftTests/TensorNNTests.swift @@ -1,7 +1,7 @@ import XCTest @testable import TensorSwift -class TensorNNTest: XCTestCase { +class TensorNNTests: XCTestCase { func testMaxPool() { do { let a = Tensor(shape: [2,3,1], elements: [0,1,2,3,4,5]) @@ -65,16 +65,25 @@ class TensorNNTest: XCTestCase { func testMaxPoolPerformance(){ let image = Tensor(shape: [28,28,3], element: 0.1) - measureBlock{ - image.maxPool(kernelSize: [2,2,1], strides: [2,2,1]) + measure{ + _ = image.maxPool(kernelSize: [2,2,1], strides: [2,2,1]) } } func testConv2dPerformance(){ let image = Tensor(shape: [28,28,1], element: 0.1) let filter = Tensor(shape: [5,5,1,16], element: 0.1) - measureBlock{ - image.conv2d(filter: filter, strides: [1,1,1]) + measure{ + _ = image.conv2d(filter: filter, strides: [1,1,1]) } } -} \ No newline at end of file + + static var allTests : [(String, (TensorNNTests) -> () throws -> Void)] { + return [ + ("testMaxPool", testMaxPool), + ("testConv2d", testConv2d), + ("testMaxPoolPerformance", testMaxPoolPerformance), + ("testConv2dPerformance", testConv2dPerformance), + ] + } +} diff --git a/TensorSwiftTests/TensorSwiftSample.swift b/Tests/TensorSwiftTests/TensorSwiftSample.swift similarity index 88% rename from TensorSwiftTests/TensorSwiftSample.swift rename to Tests/TensorSwiftTests/TensorSwiftSample.swift index 7389056..616ddfc 100644 --- a/TensorSwiftTests/TensorSwiftSample.swift +++ b/Tests/TensorSwiftTests/TensorSwiftSample.swift @@ -20,4 +20,10 @@ class TensorSwiftSample: XCTestCase { XCTAssertEqual(zeros, Tensor(shape: [2, 3, 4], elements: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])) XCTAssertEqual(ones, Tensor(shape: [2, 3, 4], elements: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) } -} \ No newline at end of file + + static var allTests : [(String, (TensorSwiftSample) -> () throws -> Void)] { + return [ + ("testSample", testSample), + ] + } +} diff --git a/Tests/TensorSwiftTests/TensorSwiftTests.swift b/Tests/TensorSwiftTests/TensorSwiftTests.swift new file mode 100644 index 0000000..581760f --- /dev/null +++ b/Tests/TensorSwiftTests/TensorSwiftTests.swift @@ -0,0 +1,28 @@ +// +// TensorSwiftTests.swift +// TensorSwift +// +// Created by Araki Takehiro on 2016/09/28. +// +// + +import XCTest + +class TensorSwiftTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + static var allTests : [(String, (TensorSwiftTests) -> () throws -> Void)] { + return [ + + ] + } +} diff --git a/TensorSwiftTests/TensorTest.swift b/Tests/TensorSwiftTests/TensorTests.swift similarity index 87% rename from TensorSwiftTests/TensorTest.swift rename to Tests/TensorSwiftTests/TensorTests.swift index 949a49c..a1df5f2 100644 --- a/TensorSwiftTests/TensorTest.swift +++ b/Tests/TensorSwiftTests/TensorTests.swift @@ -1,7 +1,7 @@ import XCTest @testable import TensorSwift -class TensorTest: XCTestCase { +class TensorTests: XCTestCase { func testIndex() { do { let a = Tensor(shape: []) @@ -74,8 +74,8 @@ class TensorTest: XCTestCase { do { let a = Tensor(shape: [2, 3], elements: [1, 2, 3, 4, 5, 6]) let b = Tensor(shape: [2, 3], elements: [7, 8, 9, 10, 11, 12]) - let r = a * b - XCTAssertEqual(r, Tensor(shape: [2, 3], elements: [7, 16, 27, 40, 55, 72])) + XCTAssertEqual(a * b, Tensor(shape: [2, 3], elements: [7, 16, 27, 40, 55, 72])) + XCTAssertEqual(b * a, Tensor(shape: [2, 3], elements: [7, 16, 27, 40, 55, 72])) } do { @@ -93,7 +93,7 @@ class TensorTest: XCTestCase { } do { - let a = Tensor(shape:[2, 3], elements: [ 1, 2, 3, 4, 5, 6]) + let a = Tensor(shape: [2, 3], elements: [1, 2, 3, 4, 5, 6]) let b: Float = 2.0 XCTAssertEqual(a * b, Tensor(shape: [2, 3], elements: [2, 4, 6, 8, 10, 12])) XCTAssertEqual(b * a, Tensor(shape: [2, 3], elements: [2, 4, 6, 8, 10, 12])) @@ -102,10 +102,10 @@ class TensorTest: XCTestCase { func testDiv() { do { - let a = Tensor(shape: [2, 3], elements: [1, 2, 3, 4, 5, 6]) + let a = Tensor(shape: [2, 3], elements: [2048, 512, 128, 32, 8, 2]) let b = Tensor(shape: [2, 3], elements: [2, 4, 8, 16, 32, 64]) - let r = a / b - XCTAssertEqual(r, Tensor(shape: [2, 3], elements: [0.5, 0.5, 0.375, 0.25, 0.15625, 0.09375])) + XCTAssertEqual(a / b, Tensor(shape: [2, 3], elements: [1024, 128, 16, 2, 0.25, 0.03125])) + XCTAssertEqual(b / a, Tensor(shape: [2, 3], elements: [0.0009765625, 0.0078125, 0.0625, 0.5, 4, 32])) } do { @@ -148,8 +148,20 @@ class TensorTest: XCTestCase { func testMatmulPerformance(){ let a = Tensor(shape: [1000, 1000], element: 0.1) let b = Tensor(shape: [1000, 1000], element: 0.1) - measureBlock{ - a.matmul(b) + measure{ + _ = a.matmul(b) } } + + static var allTests : [(String, (TensorTests) -> () throws -> Void)] { + return [ + ("testIndex", testIndex), + ("testAdd", testAdd), + ("testSub", testSub), + ("testMul", testMul), + ("testDiv", testDiv), + ("testMatmul", testMatmul), + ("testMatmulPerformance", testMatmulPerformance), + ] + } } diff --git a/zlib/include.h b/zlib/include.h deleted file mode 100755 index 4470a1f..0000000 --- a/zlib/include.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/zlib/module.modulemap b/zlib/module.modulemap deleted file mode 100755 index ef90391..0000000 --- a/zlib/module.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module zlib [system] { - header "include.h" - export * -}