This repository has been archived by the owner on Oct 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 216
This change uses tensorflow directly #31
Open
aliakbarhamzeh1378
wants to merge
1
commit into
RedaOps:master
Choose a base branch
from
aliakbarhamzeh1378:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmphego
reviewed
Feb 29, 2020
if layer == model.layers[0]: | ||
input_layer = int(str(layer.input_shape).split(",")[1][1:-1]) | ||
hidden_layers_nr += 1 | ||
if type(layer) == Dense: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, rewrite this as:
Suggested change
if type(layer) == Dense: | |
if isinstance(Dense, layer): |
Comment on lines
+48
to
+56
if type(layer) == Conv2D: | ||
layer_types.append("Conv2D") | ||
elif type(layer) == MaxPooling2D: | ||
layer_types.append("MaxPooling2D") | ||
elif type(layer) == Dropout: | ||
layer_types.append("Dropout") | ||
elif type(layer) == Flatten: | ||
layer_types.append("Flatten") | ||
elif type(layer) == Activation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto!
input_layer = int(str(layer.input_shape).split(",")[1][1:-1]) | ||
hidden_layers_nr += 1 | ||
if type(layer) == Dense: | ||
hidden_layers.append(int(str(layer.output_shape).split(",")[1][1:-1])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit complex for noobs to read, would be nice to simplify it.
Comment on lines
+68
to
+77
if (type(layer) == Conv2D): | ||
layer_types.append("Conv2D") | ||
elif (type(layer) == MaxPooling2D): | ||
layer_types.append("MaxPooling2D") | ||
elif (type(layer) == Dropout): | ||
layer_types.append("Dropout") | ||
elif (type(layer) == Flatten): | ||
layer_types.append("Flatten") | ||
elif (type(layer) == Activation): | ||
layer_types.append("Activation") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
Unpythonic C-like syntax, like the semicolons at the end of each line
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
(but not all the "line too long" ones)
endolith
referenced
this pull request
in endolith/ann-visualizer
Apr 3, 2022
Maybe Keras returned only strings in an earlier version?
endolith
added a commit
to endolith/ann-visualizer
that referenced
this pull request
Apr 3, 2022
These were suggested in RedaOps#31 by @mmphego to support inheritance
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had trouble using the previous code by TensorFlow and the code could not correctly identify the layers so it didn't work