tfd 0.0.3

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

linux windows codecov Dub version

Example

/// 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);
}

Features

  • [x] Setup CI
  • [x] Wrap tensor and session for basic usages (see tfd.session unittests).
  • [x] mir.ndslice.Slice s <=> tfd.tensor.Tensor t integration by s.tensor, t.slicedAs(s).
  • [ ] Use pbd to save/load proto files.
  • [ ] Example using C API to save/load TF graphs.
  • [ ] Parse ops.pbtxt to generate typed ops bindings.
  • [ ] Rewrite C API example with typed bindings.
  • [ ] Implement autograd, and simple training APIs in D.

Requirements

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>
Authors:
  • Shigeki Karita
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
Show all 6 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 24 downloads total

Score:
2.1
Short URL:
tfd.dub.pm