Skip to content

Commit 350d1e9

Browse files
authored
Merge pull request #213 from sguttikon/master
Copyright + License changes to files in include folder - part2
2 parents 39fdbd3 + 9d5137f commit 350d1e9

File tree

11 files changed

+610
-56
lines changed

11 files changed

+610
-56
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ You can also use the [older version](https://github.com/serizba/cppflow/tree/243
7777
## Style guide
7878

7979
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).
80+
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.
81+
8082

8183
## Remark
8284

examples/efficientnet/create_model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env python
2+
"""
3+
Example for create model functionality.
4+
"""
25

36
# MIT License
47
#

examples/load_frozen_graph/create_model.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env python
2+
"""
3+
Example for a load frozen tf graph functionality.
4+
"""
25

36
# MIT License
47
#
@@ -41,10 +44,10 @@
4144
convert_variables_to_constants_v2,
4245
)
4346

44-
input = tf.keras.Input(shape=(5,))
45-
output = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input)
46-
output = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(output)
47-
model = tf.keras.Model(inputs=input, outputs=output)
47+
input_1 = tf.keras.Input(shape=(5,))
48+
output_1 = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input_1)
49+
output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(output_1)
50+
model = tf.keras.Model(inputs=input_1, outputs=output_1)
4851

4952
# Create frozen graph
5053
x = tf.TensorSpec(model.input_shape, tf.float32, name="x")

examples/load_model/create_model.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env python
2+
"""
3+
Example for a load model functionality.
4+
"""
25

36
# MIT License
47
#
@@ -33,13 +36,12 @@
3336

3437
# Imports
3538
import tensorflow as tf
36-
import numpy as np
3739

38-
input = tf.keras.Input(shape=(5,))
40+
input_1 = tf.keras.Input(shape=(5,))
3941

40-
output = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input)
41-
output = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(output)
42-
model = tf.keras.Model(inputs=input, outputs=output)
42+
output_1 = tf.keras.layers.Dense(5, activation=tf.nn.relu)(input_1)
43+
output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)(output_1)
44+
model = tf.keras.Model(inputs=input_1, outputs=output_1)
4345

4446
model.compile()
4547

examples/load_model/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
/*!
2727
* @file main.cpp
28-
* @brief A brief description here.
29-
* @details Define custom details for the file here.
3028
* @author Afaq Sabir
3129
* @author Florian
3230
* @author Paul Nykiel

examples/multi_input_output/create_model.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env python
2+
"""
3+
Example for a multiple inputs and outputs functionality.
4+
"""
25

36
# MIT License
47
#
@@ -33,16 +36,17 @@
3336

3437
# Imports
3538
import tensorflow as tf
36-
import numpy as np
3739

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

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

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)
46+
output_1 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid,
47+
name='my_outputs_1')(x1)
48+
output_2 = tf.keras.layers.Dense(1, activation=tf.nn.sigmoid,
49+
name='my_outputs_2')(x2)
4650

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

include/cppflow/model.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// SOFTWARE.
2727

2828
/*!
29-
* @file cppflow.h
29+
* @file model.h
3030
* @author Jiannan Liu
3131
* @author liufeng27
3232
* @author Paul

include/cppflow/ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// SOFTWARE.
2323

2424
/*!
25-
* @file context.h
25+
* @file ops.h
2626
* @author Jiannan Liu
2727
* @author Sergio Izquierdo
2828
* @date @showdate "%B %d, %Y" 2020-07-31

0 commit comments

Comments
 (0)