You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,61 @@ Tensorflex contains three main structs which handle different datatypes. These a
139
139
- 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).
140
140
141
141
- 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.
142
192
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.
143
197
144
198
### Examples
145
199
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!
0 commit comments