Skip to content

Commit 6aa2c48

Browse files
authored
Merge branch 'master' into patch-2
2 parents 3e4c2a6 + 6fa035e commit 6aa2c48

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

beginner_source/introyt/introyt1_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
# Here’s a small sample of the mathematical operations available:
102102
#
103103

104-
r = torch.rand(2, 2) - 0.5 * 2 # values between -1 and 1
104+
r = (torch.rand(2, 2) - 0.5) * 2 # values between -1 and 1
105105
print('A random matrix, r:')
106106
print(r)
107107

beginner_source/introyt/modelsyt_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class LeNet(torch.nn.Module):
151151

152152
def __init__(self):
153153
super(LeNet, self).__init__()
154-
# 1 input image channel (black & white), 6 output channels, 3x3 square convolution
154+
# 1 input image channel (black & white), 6 output channels, 5x5 square convolution
155155
# kernel
156156
self.conv1 = torch.nn.Conv2d(1, 6, 5)
157157
self.conv2 = torch.nn.Conv2d(6, 16, 3)

prototype_source/tracing_based_selective_build.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(prototype) Tracing-based Selective Build Mobile Interpreter in Android and iOS
2-
2+
===============================================================================
33

44

55
*Author*: Chen Lai <https://github.com/cccclai>, Dhruv Matani <https://github.com/dhruvbird>
@@ -8,6 +8,7 @@
88
Tracing-based selective build a prototype feature to minimize library size. Since the traced result relies on the model input and traced environment, if the tracer runs in a different environment than mobile interpreter, the operator list might be different from the actual used operator list and missing operators error might raise.
99

1010
Introduction
11+
------------
1112

1213

1314
This tutorial introduces a new way to custom build mobile interpreter to further optimize mobile interpreter size. It restricts the set of operators included in the compiled binary to only the set of operators actually needed by target models. It is a technique to reduce the binary size of PyTorch for mobile deployments. Tracing Based Selective Build runs a model with specific representative inputs, and records which operators were called. The build then includes just those operators.
@@ -83,6 +84,7 @@ Following are the processes to use tracing-based selective approach to build a c
8384
8485
8586
Android
87+
-------
8688

8789
Get the Image Segmentation demo app in Android: https://github.com/pytorch/android-demo-app/tree/master/ImageSegmentation
8890

@@ -149,6 +151,7 @@ Update `all projects` part in ``ImageSegmentation/build.gradle`` to
149151

150152

151153
iOS
154+
---
152155

153156
Get ImageSegmentation demo app in iOS: https://github.com/pytorch/ios-demo-app/tree/master/ImageSegmentation
154157

0 commit comments

Comments
 (0)