|
1 | 1 | !!! summary ""
|
2 |
| - Version 1.5.2 of DynaML, released March 2, 2017, introduces functionality through improvement in the pipes API and increased integration with Tensorflow. |
| 2 | + Version 1.5.2 of DynaML, released March 5, 2017, introduces functionality through improvement in the pipes API and increased integration with Tensorflow. |
3 | 3 |
|
4 | 4 |
|
5 | 5 | ## Additions
|
|
12 | 12 |
|
13 | 13 | **Package** `dynaml.tensorflow`
|
14 | 14 |
|
15 |
| - - The `dtf` package object houses utility functions related to tensorflow primitives. Currently supports creation of tensors from arrays. |
16 |
| - - The `dtflearn` package object deals with basic neural network building blocks which are often needed while constructing prediction architectures. |
| 15 | + - The [`dtf`](https://transcendent-ai-labs.github.io/api_docs/DynaML/v1.5.2/dynaml-core/#io.github.mandar2812.dynaml.tensorflow.package$$dtf$) package object houses utility functions related to tensorflow primitives. Currently supports creation of tensors from arrays. |
17 | 16 |
|
| 17 | + ```scala |
| 18 | + import io.github.mandar2812.dynaml.tensorflow._ |
| 19 | + import org.platanios.tensorflow.api._ |
| 20 | + //Create a FLOAT32 Tensor of shape (2, 2), i.e. a square matrix |
| 21 | + val mat = dtf.tensor_f32(2, 2)(1d, 2d, 3d, 4d) |
| 22 | + |
| 23 | + //Create a random 2 * 3 matrix with independent standard normal entries |
| 24 | + val rand_mat = dtf.random(FLOAT32, 2, 3)( |
| 25 | + GaussianRV(0d, 1d) > DataPipe((x: Double) => x.toFloat) |
| 26 | + ) |
| 27 | + |
| 28 | + //Multiply matrices |
| 29 | + val prod = mat.matmul(rand_mat) |
| 30 | + println(prod.summarize()) |
| 31 | + |
| 32 | + val another_rand_mat = dtf.random(FLOAT32, 2, 3)( |
| 33 | + GaussianRV(0d, 1d) > DataPipe((x: Double) => x.toFloat) |
| 34 | + ) |
| 35 | + |
| 36 | + //Stack tensors vertically, i.e. row wise |
| 37 | + val vert_tensor = dtf.stack(Seq(rand_mat, another_rand_mat), axis = 0) |
| 38 | + //Stack vectors horizontally, i.e. column wise |
| 39 | + val horz_tensor = dtf.stack(Seq(rand_mat, another_rand_mat), axis = 1) |
| 40 | + ``` |
| 41 | + |
| 42 | + - The [`dtflearn`](https://transcendent-ai-labs.github.io/api_docs/DynaML/v1.5.2/dynaml-core/#io.github.mandar2812.dynaml.tensorflow.package$$dtflearn$) package object deals with basic neural network building blocks which are often needed while constructing prediction architectures. |
| 43 | + |
| 44 | + ```scala |
| 45 | + //Create a simple neural architecture with one convolutional layer |
| 46 | + //followed by a max pool and feedforward layer |
| 47 | + val net = tf.learn.Cast("Input/Cast", FLOAT32) >> |
| 48 | + dtflearn.conv2d_pyramid(2, 3)(4, 2)(0.1f, true, 0.6F) >> |
| 49 | + tf.learn.MaxPool("Layer_3/MaxPool", Seq(1, 2, 2, 1), 1, 1, SamePadding) >> |
| 50 | + tf.learn.Flatten("Layer_3/Flatten") >> |
| 51 | + dtflearn.feedforward(256)(id = 4) >> |
| 52 | + tf.learn.ReLU("Layer_4/ReLU", 0.1f) >> |
| 53 | + dtflearn.feedforward(10)(id = 5) |
| 54 | + ``` |
18 | 55 |
|
19 | 56 | ### Library Organisation
|
20 | 57 |
|
21 | 58 | - Added `dynaml-repl` and `dynaml-notebook` modules to repository.
|
22 | 59 |
|
23 | 60 | ### DynaML Server
|
24 | 61 |
|
25 |
| - - DynaML ssh server now available |
| 62 | + - DynaML ssh server now available (only in Local mode) |
26 | 63 | ```bash
|
27 | 64 | $ ./target/universal/stage/bin/dynaml --server
|
28 | 65 | ```
|
29 |
| - To login to the server open a separate shell and type |
| 66 | + To login to the server open a separate shell and type, (when prompted for password, just press ENTER) |
30 | 67 | ```bash
|
31 | 68 | $ ssh repl@localhost -p22222
|
32 | 69 | ```
|
|
0 commit comments