Skip to content

Commit ee55e90

Browse files
authored
Update README.md
1 parent 0a4c3a2 commit ee55e90

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

README.md

+59
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,61 @@ Tensorflex contains three main structs which handle different datatypes. These a
139139
- Takes in five arguments: a pre-trained Tensorflow graph `.pb` model read in from the `read_graph/1` function (`graph`), an input tensor with the dimensions and data required for the input operation of the graph to run (`tensor1`), an output tensor allocated with the right dimensions (`tensor2`), the name of the input operation of the graph that needs where the input data is fed (`input_opname`), and the output operation name in the graph where the outputs are obtained (`output_opname`). The input tensor is generally created from the matrices manually or using the `load_csv_as_matrix/2` function, and then passed through to one of the tensor creation functions. For image classification the `load_image_as_tensor/1` can also be used to create the input tensor from an image. The output tensor is created using the tensor allocation functions (generally containing `alloc` at the end of the function name).
140140

141141
- Returns a List of Lists (similar to the `matrix_to_lists/1` function) containing the generated predictions as per the output tensor dimensions.
142+
143+
- `add_scalar_to_matrix/2`:
144+
- Adds scalar value to matrix.
145+
146+
- Takes two arguments: `%Matrix` matrix and scalar value (int or float)
147+
148+
- Returns a `%Matrix` modified matrix.
149+
150+
- `subtract_scalar_from_matrix/2`:
151+
- Subtracts scalar value from matrix.
152+
153+
- Takes two arguments: `%Matrix` matrix and scalar value (int or float)
154+
155+
- Returns a `%Matrix` modified matrix.
156+
157+
158+
- `multiply_matrix_with_scalar/2`:
159+
- Multiplies scalar value with matrix.
160+
161+
- Takes two arguments: `%Matrix` matrix and scalar value (int or float)
162+
163+
- Returns a `%Matrix` modified matrix.
164+
165+
- `divide_matrix_by_scalar/2`:
166+
- Divides matrix values by scalar.
167+
168+
- Takes two arguments: `%Matrix` matrix and scalar value (int or float)
169+
170+
- Returns a `%Matrix` modified matrix.
171+
172+
- `add_matrices/2`:
173+
- Adds two matrices of same dimensions together.
174+
175+
- Takes in two `%Matrix` matrices as arguments.
176+
177+
- Returns the resultant `%Matrix` matrix.
178+
179+
- `subtract_matrices/2`:
180+
- Subtracts `matrix2` from `matrix1`.
181+
182+
- Takes in two `%Matrix` matrices as arguments.
183+
184+
- Returns the resultant `%Matrix` matrix.
185+
186+
- `tensor_to_matrix/1`:
187+
- Converts the data stored in a 2-D tensor back to a 2-D matrix.
188+
189+
- Takes in a single argument as a `%Tensor` tensor (any `TF_Datatype`).
190+
191+
- Returns a `%Matrix` 2-D matrix.
142192

193+
- __NOTE__: Tensorflex doesn't currently support 3-D matrices, and therefore
194+
tensors that are 3-D (such as created using the `load_image_as_tensor/1`
195+
function) cannot be converted back to a matrix, yet. Support for 3-D matrices
196+
will be added soon.
143197

144198
### Examples
145199
Examples are generally added in full description on my blog [here](http://anshumanc.ml). A blog post covering how to do classification on the Iris Dataset is present [here](http://www.anshumanc.ml/gsoc/2018/06/14/gsoc/).
@@ -429,3 +483,8 @@ Thus we can clearly see that in this case the RNN indicates negative sentiment!
429483
- [PR #26: Added documentation](https://github.com/anshuman23/tensorflex/pull/26)
430484
- [PR #28: Added improved tests](https://github.com/anshuman23/tensorflex/pull/28)
431485
- [PR #29: Adding metadata to mix.exs](https://github.com/anshuman23/tensorflex/pull/29)
486+
- [PR #31: Update nifs.ex](https://github.com/anshuman23/tensorflex/pull/31)
487+
- [PR #32: Fixed indentation and corrected warnings](https://github.com/anshuman23/tensorflex/pull/32)
488+
- [PR #35: Added new matrix operations](https://github.com/anshuman23/tensorflex/pull/35)
489+
- [PR #36: Fixed bugs in C code](https://github.com/anshuman23/tensorflex/pull/36)
490+
- [PR #37: Added tensor_to_matrix/1 (with tests/docs)](https://github.com/anshuman23/tensorflex/pull/37)

0 commit comments

Comments
 (0)