Net2Vis icon indicating copy to clipboard operation
Net2Vis copied to clipboard

Code not executed

Open abdulrehman192 opened this issue 1 year ago • 3 comments

Describe the bug When I reload or press update button its given an error code not executed.

Network ID https://viscom.net2vis.uni-ulm.de/OG1Br2BAkYSwwrV6CADl4X5EfErFjUzvuUwXWDdLbdsIXNhb9L

Expected behavior architecture should be drawn

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser chrome
  • Version [e.g. 22]

Additional context also if I upload a new model it gives an error

abdulrehman192 avatar Nov 29 '23 11:11 abdulrehman192

It seems like the link you send does not have valid data anymore. Can you either try to paste your model code again or share it with me so I can debug?

Sparkier avatar Nov 29 '23 14:11 Sparkier

I run the default code which is pre loaded. And get the following error in attached screenshot.

On Wed, Nov 29, 2023, 7:39 PM Alex Bäuerle @.***> wrote:

It seems like the link you send does not have valid data anymore. Can you either try to paste your model code again or share it with me so I can debug?

— Reply to this email directly, view it on GitHub https://github.com/viscom-ulm/Net2Vis/issues/50#issuecomment-1832021510, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS2CTJW4XZ7MWWYM34ZMG5TYG5CINAVCNFSM6AAAAAA77IKUL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZSGAZDCNJRGA . You are receiving this because you authored the thread.Message ID: @.***>

abdulrehman192 avatar Nov 29 '23 21:11 abdulrehman192

For me, the default code works, see for example here.

When I open your link, however, this is the code I see:

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import SimpleRNN, Dense

def get_model(input_shape, rnn_units, num_classes):
    model = Sequential()
    
    # Simple RNN layer
    model.add(SimpleRNN(units=rnn_units, input_shape=input_shape))
    
    # Dense layer for classification
    model.add(Dense(num_classes, activation='softmax'))
    
    return model

# Example usage:
input_shape = (10, 15)  # Define the input shape based on your data
rnn_units = 32  # Number of units in the SimpleRNN layer
num_classes = 10  # Number of output classes

# Create the model
model = get_model(input_shape, rnn_units, num_classes)

This won't work because we call the get_model() function to render the model which you changed to include some parameters. If you want this code to work you'd have to change it like this.

Sparkier avatar Nov 30 '23 09:11 Sparkier