Skip to content

Commit ea1e070

Browse files
committed
Made it work with playgrounds
Removed asset catalogues to make it work with playgrounds
1 parent 80e24b9 commit ea1e070

File tree

83 files changed

+5347
-244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+5347
-244
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MLExports/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import UIKit
2+
import PlaygroundSupport
3+
4+
// Create canvas view controller
5+
let canvasViewController = CanvasViewController()
6+
7+
let image = UIImage(named: "background.png")
8+
9+
PlaygroundPage.current.liveView = canvasViewController.view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Timeline
3+
version = "3.0">
4+
<TimelineItems>
5+
<LoggerValueHistoryTimelineItem
6+
documentLocation = "file:///Users/nathanflurry/Documents/VPL/Playground.playground/Pages/Page.xcplaygroundpage#CharacterRangeLen=60&amp;CharacterRangeLoc=169&amp;EndingColumnNumber=0&amp;EndingLineNumber=9&amp;StartingColumnNumber=0&amp;StartingLineNumber=8&amp;Timestamp=544233889.834365"
7+
selectedRepresentationIndex = "0"
8+
shouldTrackSuperviewWidth = "NO">
9+
</LoggerValueHistoryTimelineItem>
10+
</TimelineItems>
11+
</Timeline>
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"storage" : "model.espresso.weights",
3+
"properties" : {
4+
5+
},
6+
"format_version" : 200,
7+
"layers" : [
8+
{
9+
"pad_r" : 0,
10+
"fused_relu" : 1,
11+
"fused_tanh" : 0,
12+
"pad_fill_mode" : 0,
13+
"pad_b" : 0,
14+
"pad_l" : 0,
15+
"top" : "conv2d_1__activation___output",
16+
"blob_weights" : 3,
17+
"K" : 1,
18+
"blob_biases" : 1,
19+
"name" : "conv2d_1",
20+
"has_batch_norm" : 0,
21+
"type" : "convolution",
22+
"n_groups" : 1,
23+
"pad_t" : 0,
24+
"has_biases" : 1,
25+
"C" : 32,
26+
"bottom" : "Image",
27+
"weights" : {
28+
29+
},
30+
"pad_mode" : 0,
31+
"Nx" : 3,
32+
"pad_value" : 0,
33+
"Ny" : 3,
34+
"n_parallel" : 1
35+
},
36+
{
37+
"pad_r" : 0,
38+
"fused_relu" : 1,
39+
"fused_tanh" : 0,
40+
"pad_fill_mode" : 0,
41+
"pad_b" : 0,
42+
"pad_l" : 0,
43+
"top" : "conv2d_2__activation___output",
44+
"blob_weights" : 7,
45+
"K" : 32,
46+
"blob_biases" : 5,
47+
"name" : "conv2d_2",
48+
"has_batch_norm" : 0,
49+
"type" : "convolution",
50+
"n_groups" : 1,
51+
"pad_t" : 0,
52+
"has_biases" : 1,
53+
"C" : 64,
54+
"bottom" : "conv2d_1__activation___output",
55+
"weights" : {
56+
57+
},
58+
"pad_mode" : 0,
59+
"Nx" : 3,
60+
"pad_value" : 0,
61+
"Ny" : 3,
62+
"n_parallel" : 1
63+
},
64+
{
65+
"pad_value" : 0,
66+
"average_count_exclude_padding" : 1,
67+
"top_shape_style" : 0,
68+
"avg_or_max" : 1,
69+
"stride_x" : 2,
70+
"pad_mode" : 2,
71+
"stride_y" : 2,
72+
"pad_t" : 0,
73+
"weights" : {
74+
75+
},
76+
"size_y" : 2,
77+
"type" : "pool",
78+
"pad_r" : 0,
79+
"pad_b" : 0,
80+
"size_x" : 2,
81+
"pad_fill_mode" : 0,
82+
"bottom" : "conv2d_2__activation___output",
83+
"pad_l" : 0,
84+
"name" : "max_pooling2d_1",
85+
"top" : "max_pooling2d_1_output"
86+
},
87+
{
88+
"bottom" : "max_pooling2d_1_output",
89+
"weights" : {
90+
91+
},
92+
"mode" : 1,
93+
"hint_fallback_from_metal" : 1,
94+
"top" : "flatten_1_output",
95+
"type" : "flatten",
96+
"name" : "flatten_1"
97+
},
98+
{
99+
"nB" : 9216,
100+
"top" : "dense_1__activation___output",
101+
"has_biases" : 1,
102+
"weights" : {
103+
104+
},
105+
"nC" : 128,
106+
"blob_weights" : 11,
107+
"type" : "inner_product",
108+
"has_relu" : 1,
109+
"bottom" : "flatten_1_output",
110+
"blob_biases" : 9,
111+
"has_tanh" : 0,
112+
"hint_fallback_from_metal" : 1,
113+
"name" : "dense_1",
114+
"has_prelu" : 0
115+
},
116+
{
117+
"nB" : 128,
118+
"top" : "dense_2_output",
119+
"has_biases" : 1,
120+
"weights" : {
121+
122+
},
123+
"nC" : 36,
124+
"blob_weights" : 15,
125+
"type" : "inner_product",
126+
"has_relu" : 0,
127+
"bottom" : "dense_1__activation___output",
128+
"blob_biases" : 13,
129+
"has_tanh" : 0,
130+
"name" : "dense_2",
131+
"has_prelu" : 0
132+
},
133+
{
134+
"C" : 2,
135+
"weights" : {
136+
137+
},
138+
"top" : "Probabilities",
139+
"type" : "softmax",
140+
"name" : "dense_2__activation__",
141+
"bottom" : "dense_2_output"
142+
}
143+
]
144+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"layer_shapes" : {
3+
"max_pooling2d_1_output" : {
4+
"k" : 64,
5+
"w" : 12,
6+
"n" : 1,
7+
"h" : 12
8+
},
9+
"flatten_1_output" : {
10+
"k" : 9216,
11+
"w" : 1,
12+
"n" : 1,
13+
"h" : 1
14+
},
15+
"Probabilities" : {
16+
"k" : 36,
17+
"w" : 1,
18+
"n" : 1,
19+
"h" : 1
20+
},
21+
"conv2d_2__activation___output" : {
22+
"k" : 64,
23+
"w" : 24,
24+
"n" : 1,
25+
"h" : 24
26+
},
27+
"conv2d_1__activation___output" : {
28+
"k" : 32,
29+
"w" : 26,
30+
"n" : 1,
31+
"h" : 26
32+
},
33+
"dense_1__activation___output" : {
34+
"k" : 128,
35+
"w" : 1,
36+
"n" : 1,
37+
"h" : 1
38+
},
39+
"dense_2_output" : {
40+
"k" : 36,
41+
"w" : 1,
42+
"n" : 1,
43+
"h" : 1
44+
},
45+
"Image" : {
46+
"k" : 1,
47+
"w" : 28,
48+
"n" : 1,
49+
"h" : 28
50+
}
51+
}
52+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)