Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgradient.html
More file actions
Latest commit
290 lines (265 loc) · 14.5 KB
/
Copy pathgradient.html
File metadata and controls
290 lines (265 loc) · 14.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<html>
<head>
<metacharset="utf-8" />
<metahttp-equiv="X-UA-Compatible" content="IE=edge">
<metaname="viewport" content="width=device-width, initial-scale=1">
<title>TensorFlow for .NET</title>
<metaname="description" content="Full TensorFlow binding for .NET by Lost Tech">
<metaname="keywords" content="TensorFlow,.NET,dotnet,C#,F#,VB.NET">
<metaname="author" content="Victor Milovanov">
<linkrel="icon" href="img/LostTech.ico"/>
<!-- Bootstrap Core CSS -->
<linkhref="css/bootstrap.min.css" rel="stylesheet">
<!-- Clean CSS -->
<linkhref="css/clean-blog.min.css" rel="stylesheet">
<linkhref="css/diskache.css" rel="stylesheet" />
<!-- Custom Fonts -->
<linkhref="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<linkhref='//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<linkhref='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- jQuery -->
<scriptsrc="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<scriptsrc="js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<scriptsrc="js/clean-blog.min.js"></script>
<scriptsrc="js/diskache.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*newDate();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create','UA-107799728-1','auto');
ga('send','pageview');
</script>
</head>
<body>
<!-- Navigation -->
<navclass="navbar navbar-default navbar-custom navbar-fixed-top">
<divclass="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<divclass="navbar-header page-scroll">
<buttontype="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<spanclass="sr-only">Toggle navigation</span>
<spanclass="icon-bar"></span>
<spanclass="icon-bar"></span>
<spanclass="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<divclass="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ulclass="nav navbar-nav navbar-right">
<li>
<ahref="gradient.html" title="Gradient - full TensorFlow binding for C#">Gradient</a>
</li>
<li>
<ahref="https://stackwm.github.io/" title="Stack - customizable tiling window manager for Windows">Stack</a>
</li>
<li>
<ahref="https://ml.blogs.losttech.software/" title="Our blog on deep learning: C# examples, Gradient news, etc">ML Blog</a>
</li>
<li>
<ahref="about.html">About</a>
</li>
<li>
<ahref="contact.html">Contact</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Header -->
<!-- Set your background image for this header on the line below. -->
<headerclass="intro-header" style="background-image: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.25)), url('img/gradient-post-bg.jpg');">
<divclass="container">
<divclass="row">
<divclass="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<divclass="post-heading">
<h1>TensorFlow for .NET</h1>
<divclass="meta">train neural networks with TensorFlow in C#</div>
<divclass="meta padding"> </div>
<divclass="meta padding"> </div>
<divclass="meta">
<ahref="https://losttech.software/buy_gradient.html" class="btn btn-primary">Get Now</a>
<p>
<small><ahref="https://ml.blogs.losttech.software/TF-1.15-Release-Candidate/">See What's New!</a></small>
</p>
</div>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<article>
<divclass="container">
<divclass="row">
<divclass="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<p>
TensorFlow for .NET by Lost Tech allows you to create, train, and use machine learning
models with the full power of TensorFlow API on C#, F# or any other .NET language.
</p>
<prestyle="font-family:Consolas;font-size:13px;color:black;background:white;"><spanstyle="color:blue;">var</span> input = <spanstyle="color:#2b91af;">tf</span>.placeholder(<spanstyle="color:#2b91af;">tf</span>.float32, <spanstyle="color:blue;">new</span> <spanstyle="color:#2b91af;">TensorShape</span>(<spanstyle="color:blue;">null</span>, 1), name: <spanstyle="color:#a31515;">"x"</span>);
<spanstyle="color:blue;">var</span> output = <spanstyle="color:#2b91af;">tf</span>.placeholder(<spanstyle="color:#2b91af;">tf</span>.float32, <spanstyle="color:blue;">new</span> <spanstyle="color:#2b91af;">TensorShape</span>(<spanstyle="color:blue;">null</span>, 1), name: <spanstyle="color:#a31515;">"y"</span>);
<spanstyle="color:blue;">var</span> hiddenLayer = <spanstyle="color:#2b91af;">tf</span>.<spanstyle="color:#2b91af;">layers</span>.dense(input, hiddenSize,
activation: <spanstyle="color:#2b91af;">tf</span>.sigmoid_fn,
kernel_initializer: <spanstyle="color:blue;">new</span> <spanstyle="color:#2b91af;">ones_initializer</span>(),
bias_initializer: <spanstyle="color:blue;">new</span> <spanstyle="color:#2b91af;">random_uniform_initializer</span>(minval: -x1, maxval: -x0),
name: <spanstyle="color:#a31515;">"hidden"</span>);
<spanstyle="color:blue;">var</span> model = <spanstyle="color:#2b91af;">tf</span>.<spanstyle="color:#2b91af;">layers</span>.dense(hiddenLayer, units: 1, name: <spanstyle="color:#a31515;">"output"</span>);
<spanstyle="color:blue;">var</span> cost = <spanstyle="color:#2b91af;">tf</span>.<spanstyle="color:#2b91af;">losses</span>.mean_squared_error(output, model);
<spanstyle="color:blue;">var</span> training = <spanstyle="color:blue;">new</span> <spanstyle="color:#2b91af;">GradientDescentOptimizer</span>(learning_rate: learningRate).minimize(cost);</pre>
<spanclass="caption text-muted">Code sample.</span>
<hr/>
<ahref="https://ml.blogs.losttech.software/" class="btn btn-primary btn-block">Read Our ML Blog</a>
<hr/>
<h3>Features</h3>
<hr/>
<ul>
<li>
<h4>Access the full set of <ahref="https://www.tensorflow.org/versions/r1.15/api_docs/python/tf">TensorFlow APIs</a></h4>
<ul>
<li>Build computation graphs, and run them in sessions</li>
<li>Use Keras-style <ahref="https://medium.com/tensorflow/standardizing-on-keras-guidance-on-high-level-apis-in-tensorflow-2-0-bad2b04c819a">high-level APIs</a></li>
<li>Build fast data pipelines, keep logs and model checkpoints</li>
<li>Use estimators and the full power of tf.contrib</li>
<li>Use eager mode to transform data interactively</li>
<li>Many more</li>
</ul>
</li>
<li><h4>Train and run models on any hardware platform: CPUs, GPUs, TPUs</h4></li>
<li><h4>Use distributed training features</h4></li>
<li>
<h4>Track your training progress with <ahref="https://github.com/tensorflow/tensorboard/blob/master/docs/r1/summaries.md">TensorBoard</a></h4>
<p>
<imgclass="img-responsive" src="https://www.tensorflow.org/images/mnist_tensorboard.png" title="TensorBoard screenshot" />
</p>
</li>
<li>
<h4>Easily port numerous existing TensorFlow examples</h4>
<ul>
<li>
From simple numerical computation samples to state-of-art models like
<ahref="https://en.wikipedia.org/wiki/AlphaZero">AlphaZero</a> - the new world's Go champion by DeepMind.
</li>
<li>
Our <ahref="https://habr.com/post/453232/">GPT-2 demo</a> was built in one week just a month
after OpenAI released their first model, and included both training and infrerence,
demonstrating <strong>incredible time-to-market with LostTech.TensorFlow</strong>
</li>
</ul>
</li>
<li>
<h4>Get started quickly with a collection of <ahref="https://github.com/losttech/Gradient-Samples">samples</a></h4>
</li>
<li>
<h4>Seek help with the <ahref="https://stackoverflow.com/questions/tagged/tensorflow">growing community</a></h4>
</li>
<li>
<h4>Use C# for machine learning</h4>
<ul>
<li>Static typing when possible, fallback to dynamic in corner cases</li>
<li>IDE support: code completion, documentation hints for classes, functions, and parameters</li>
<li>Support for C# 8.0 features, such as ranges</li>
<li>Can be used from C# interactive, and C# <ahref="https://github.com/zabirauf/icsharp">kernel for Jupyter</a></li>
</ul>
</li>
<li>
<h4>
LostTech.TensorFlow is about 18% faster than TensorFlow.NET
on a <ahref="https://github.com/losttech/Gradient-Perf">CNN training benchmark</a>
</h4>
<p>
<imgclass="img-responsive" src="https://ml.blogs.losttech.software/images/perf-vs-tf.net.png" title="performance comparison" />
</p>
</li>
</ul>
<p></p>
<hr/>
<h3>Comparison with <ahref="https://github.com/migueldeicaza/TensorFlowSharp">TensorFlowSharp</a></h3>
<hr/>
<tableclass="feature-comparison" style="width: 100%">
<thead>
<tr>
<td></td>
<tdstyle="width: 30%">TensorFlow.NET</td>
<tdstyle="width: 30%">LostTech.TensorFlow</td>
</tr>
</thead>
<tbody>
<tr><td>Load TensorFlow models</td><tdclass="win">✓</td><tdclass="win">✓</td></tr>
<tr><td>Train existing models</td><tdclass="win">✓</td><tdclass="win">✓</td></tr>
<tr><td>Create new models with low-level API</td><tdclass="win">✓</td><tdclass="win">✓</td></tr>
<tr><td>Create new models with high-level API</td><tdclass="loose">✗</td><tdclass="win">✓</td></tr>
<tr><td>Latest algorithms</td><tdclass="loose">Some</td><tdclass="win">Most</td></tr>
<tr><td>Dependencies</td><tdclass="win">TF</td><tdclass="loose">TF + Python</td></tr>
<tr><td>TensorBoard integration</td><tdclass="loose">✗</td><tdclass="win">✓</td></tr>
<tr><td>Estimators</td><tdclass="loose">✗</td><tdclass="win">✓</td></tr>
<tr><td>Dataset manipulation via tf.data</td><tdclass="loose">✗</td><tdclass="win">✓</td></tr>
<tr><td>tf.contrib</td><tdclass="loose">✗</td><tdclass="win" title="Available, but not supported">✓*</td></tr>
<tr><td>Commercial support</td><tdclass="loose">✗</td><tdclass="win">✓</td></tr>
<tr><td>Performance</td><tdclass="loose">1x</td><tdclass="win">1.18x</td></tr>
<tr><td>TPU support</td><tdclass="loose">✗</td><tdclass="win">✓</td></tr>
<tr><td>AMD GPU support</td><tdclass="loose">✗</td><tdclass="win">✓</td></tr>
</tbody>
</table>
<p></p>
<hr/>
<h3>Documentation & Tutorials</h3>
<hr/>
<ul>
<li><ahref="https://ml.blogs.losttech.software/">Our Machine Learning Blog</a>: cool samples, LostTech.TensorFlow news, etc</li>
<li>See <ahref="https://ml.blogs.losttech.software/TF-1.15-Release-Candidate/">What's New</a> in the latest version</li>
<li><ahref="https://github.com/losttech/Gradient/#contents">Getting started</a></li>
<li><ahref="https://ml.blogs.losttech.software/Reinforcement-Learning-With-Unity-ML-Agents/">Reinforcement learning</a> with Unity ML Agents</li>
<li><ahref="https://habr.com/post/453232/">Writing billion songs with C# and Deep Learning</a> + <ahref="https://billionsongs.azurewebsites.net/">Demo</a></li>
<li><ahref="https://lostmsu.github.io/Not-CSharp/">C# or NOT</a>: train deep convolutional network to classify programming language from a code fragment</li>
<li><ahref="https://habr.com/post/437174/">.NET, TensorFlow, and the windmills of Kaggle</a></li>
</ul>
<hr/>
<h4>
<ahref="https://losttech.software/buy_gradient.html">Get it now!</a>
</h4>
<hr/>
</div>
</div>
</div>
</article>
<pclass="copyright text-muted photo-credit">
Photo credit: <ahref="https://www.pexels.com/@florian-weihmann-459786">Florian Weihmann from Pexels</a>
<br/>
TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.
</p>
<hr/>
<!-- Footer -->
<footer>
<divclass="container">
<divclass="row">
<divclass="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ulclass="list-inline text-center">
<li>
<ahref="https://www.facebook.com/losttechllc">
<spanclass="fa-stack fa-lg">
<iclass="fa fa-circle fa-stack-2x"></i>
<iclass="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<spanclass="fa-stack fa-lg">
<iclass="fa fa-circle fa-stack-2x"></i>
<iclass="fa fa-windows fa-stack-1x fa-inverse"></i>
</span>
</li>
</ul>
<pclass="copyright text-muted">Copyright © <ahref="about.html">Lost Tech LLC</a> 2015-2021</p>
<pclass="copyright text-muted photo-credit">Site design: <ahref="http://www.ironsummitmedia.com/">Iron Summit Media Strategies, LLC</a></p>
</div>
</div>
</div>
</footer>
</body>
<scriptsrc="js/instant.page.js"></script>
</html>