tfd 0.0.4
TF for D
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
tfd: tensorflow for D
Example
Mir is to tfd what NumPy is to Tensorflow.
/// tensor add
import tfd;
import mir.ndslice : as, iota;
with (newGraph)
{
auto i = iota(2, 3, 4).as!float;
Operation x = placeholder!float("x", 2, 3, 4);
Operation two = constant(i);
Operation add = x + two;
Tensor addVal = session.run([add], [x: i.tensor])[0];
assert(addVal.sliced!(float, 3) == i * 2);
}
And more:
Features
- [x] Setup CI
- [x] Wrap tensor and session for basic usages (see
tfd.session
unittests). - [x] mir.ndslice.Slice
s
<=> tfd.tensor.Tensort
integration bys.tensor
,t.slicedAs(s)
. - [x] Example to save/load TF graphs.
- [ ] Use pbd to save/load proto files.
- [ ] Parse
ops.pbtxt
to generate typed ops bindings. - [ ] Rewrite C API example with typed bindings.
- [ ] Implement autograd, and simple training APIs in D.
- [ ] Support cloud TPU.
Requirements
- libtensorflow. Currently, tfd only supports
- Linux CPU v1.15.0
- Linux GPU v1.15.0 (Not tested in CI)
- Windows CPU v1.15.0
Re-generate bindings
tfd uses dpp to generate bindings from TF C-API. You need libclang
to run dpp.
dub fetch dpp
dub run dpp -- --preprocess-only --include-path ./download/include <target dpp file>
- 0.0.4 released 4 years ago
- ShigekiKarita/tfd
- BSL-1.0
- Copyright © 2020, Shigeki Karita
- Authors:
- Dependencies:
- mir-algorithm
- Versions:
-
0.0.5 2020-May-15 0.0.4 2020-May-10 0.0.3 2020-May-09 0.0.2 2020-May-09 0.0.1 2020-May-02 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
24 downloads total
-
- Score:
- 2.1
- Short URL:
- tfd.dub.pm