tfd 0.0.5

TF for D


To use this package, run the following command in your project's root directory:

tfd: tensorflow for D

linux windows codecov Dub version

Installation

  • If your project needs only TF C API bindings: $ dub add tfd:deimos
  • If your project needs entire tfd packages: $ dub add tfd

see also Requirements

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] dpp generated C API bindings
  • [x] Support @nogc nothrow.
  • [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).
  • [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.
  • [ ] Support dip1000.

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
Sub packages:
tfd:deimos
Dependencies:
tfd:deimos, 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

  • 0 downloads total

Score:
2.1
Short URL:
tfd.dub.pm