Skip to content

Commit

Permalink
Merge pull request #213 from sguttikon/master
Browse files Browse the repository at this point in the history
Copyright + License changes to files in include folder - part2
  • Loading branch information
serizba authored Sep 23, 2022
2 parents 39fdbd3 + 9d5137f commit 350d1e9
Show file tree
Hide file tree
Showing 11 changed files with 610 additions and 56 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ You can also use the [older version](https://github.com/serizba/cppflow/tree/243
## Style guide

We use the [Google's C++ style guide](https://google.github.io/styleguide/cppguide.html) using static code linker [cpplint](https://github.com/cpplint/cpplint).
We use the [Google's Python style guide](https://google.github.io/styleguide/pyguide.html) using static code linker [pylint](https://pylint.pycqa.org/en/latest/user_guide/installation/index.html) using attached pylintrc configuration.


## Remark

Expand Down
3 changes: 3 additions & 0 deletions examples/efficientnet/create_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python
"""
Example for create model functionality.
"""

# MIT License
#
Expand Down
11 changes: 7 additions & 4 deletions examples/load_frozen_graph/create_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python
"""
Example for a load frozen tf graph functionality.
"""

# MIT License
#
Expand Down Expand Up @@ -41,10 +44,10 @@
convert_variables_to_constants_v2,
)

input = tf.keras.Input(shape=(5,))
output = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input)
output = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(output)
model = tf.keras.Model(inputs=input, outputs=output)
input_1 = tf.keras.Input(shape=(5,))
output_1 = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input_1)
output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(output_1)
model = tf.keras.Model(inputs=input_1, outputs=output_1)

# Create frozen graph
x = tf.TensorSpec(model.input_shape, tf.float32, name="x")
Expand Down
12 changes: 7 additions & 5 deletions examples/load_model/create_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python
"""
Example for a load model functionality.
"""

# MIT License
#
Expand Down Expand Up @@ -33,13 +36,12 @@

# Imports
import tensorflow as tf
import numpy as np

input = tf.keras.Input(shape=(5,))
input_1 = tf.keras.Input(shape=(5,))

output = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input)
output = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(output)
model = tf.keras.Model(inputs=input, outputs=output)
output_1 = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input_1)
output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(output_1)
model = tf.keras.Model(inputs=input_1, outputs=output_1)

model.compile()

Expand Down
2 changes: 0 additions & 2 deletions examples/load_model/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

/*!
* @file main.cpp
* @brief A brief description here.
* @details Define custom details for the file here.
* @author Afaq Sabir
* @author Florian
* @author Paul Nykiel
Expand Down
10 changes: 7 additions & 3 deletions examples/multi_input_output/create_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python
"""
Example for a multiple inputs and outputs functionality.
"""

# MIT License
#
Expand Down Expand Up @@ -33,16 +36,17 @@

# Imports
import tensorflow as tf
import numpy as np

input_1 = tf.keras.Input(shape=(5,), name='my_input_1')
input_2 = tf.keras.Input(shape=(5,), name='my_input_2')

x1 = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input_1)
x2 = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input_2)

output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid, name='my_outputs_1')(x1)
output_2 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid, name='my_outputs_2')(x2)
output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid,
name='my_outputs_1')(x1)
output_2 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid,
name='my_outputs_2')(x2)

model = tf.keras.Model(inputs=[input_1, input_2], outputs=[output_1, output_2])

Expand Down
2 changes: 1 addition & 1 deletion include/cppflow/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// SOFTWARE.

/*!
* @file cppflow.h
* @file model.h
* @author Jiannan Liu
* @author liufeng27
* @author Paul
Expand Down
2 changes: 1 addition & 1 deletion include/cppflow/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// SOFTWARE.

/*!
* @file context.h
* @file ops.h
* @author Jiannan Liu
* @author Sergio Izquierdo
* @date @showdate "%B %d, %Y" 2020-07-31
Expand Down
Loading

0 comments on commit 350d1e9

Please sign in to comment.