|
1 | 1 | #!/usr/bin/env python |
| 2 | +""" |
| 3 | + Example for a multiple inputs and outputs functionality. |
| 4 | +""" |
2 | 5 |
|
3 | 6 | # MIT License |
4 | 7 | # |
|
22 | 25 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
23 | 26 | # SOFTWARE. |
24 | 27 |
|
25 | | -# @file create_model.py |
26 | | -# |
27 | | -# @brief A brief description here. |
28 | | -# |
29 | | -# @section description_create_model Define custom details for the file here. |
30 | | -# |
31 | | -# @section author_create_model Author(s) |
32 | | -# - Created by Sergio Izquierdo |
| 28 | +## |
| 29 | +# @file create_model.py |
| 30 | +# @author Sergio Izquierdo |
| 31 | +# @date @showdate "%B %d, %Y" 2020-10-20 |
33 | 32 |
|
34 | 33 | # Imports |
35 | 34 | import tensorflow as tf |
36 | | -import numpy as np |
37 | 35 |
|
38 | 36 | input_1 = tf.keras.Input(shape=(5,), name='my_input_1') |
39 | 37 | input_2 = tf.keras.Input(shape=(5,), name='my_input_2') |
40 | 38 |
|
41 | 39 | x1 = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input_1) |
42 | 40 | x2 = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input_2) |
43 | 41 |
|
44 | | -output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid, name='my_outputs_1')(x1) |
45 | | -output_2 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid, name='my_outputs_2')(x2) |
| 42 | +output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid, |
| 43 | + name='my_outputs_1')(x1) |
| 44 | +output_2 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid, |
| 45 | + name='my_outputs_2')(x2) |
46 | 46 |
|
47 | 47 | model = tf.keras.Model(inputs=[input_1, input_2], outputs=[output_1, output_2]) |
48 | 48 |
|
|
0 commit comments