Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,
I have a problem
please guide me
thank you
Python
def model_fn():
  model = tf.keras.models.Sequential([

  tf.keras.Input(bdbd =Input(shape=(300,15))),
  tf.keras.layers(bd1= SeqSelfAttention())(bdbd) ,
  tf.keras.layers(bd1  = LSTM(32, activation='tanh', return_sequences=True)(bd1),


  tf.keras.Input(rhrh =Input(shape=(300,18))),
  tf.keras.layers(rh1 = SeqSelfAttention())(rhrh) ,
  tf.keras.layers(rh1 = LSTM(32, activation='tanh', return_sequences=True))(rh1),

  tf.keras.Input(lhlh    = Input(shape=(300,18))),
  tf.keras.layers(lh1     = SeqSelfAttention()(lhlh)),
  tf.keras.layers(lh1     = LSTM(32, activation='tanh', return_sequences=True))(lh1),
#


  tf.keras.Input(rfrf    = Input(shape=(300,12))),
  tf.keras.layers(rf1     = SeqSelfAttention()(rfrf)),
  tf.keras.layers(rf1     = LSTM(32, activation='tanh', return_sequences=True))(rf1),
#
  tf.keras.Input(lflf    = Input(shape=(300,12))),
  tf.keras.layers(lf1     = SeqSelfAttention()(lflf)),
  tf.keras.layers(lf1     = LSTM(32, activation='tanh', return_sequences=True))(lf1),

  tf.keras.layers(bdrh = concatenate([bd1, rh1],axis=-1)),
  tf.keras.layers(bdrh1 = LSTM(32, activation='tanh', return_sequences=True))(bdrh),
  tf.keras.layers(bdlh = concatenate([bd1, lh1],axis=-1)),
  tf.keras.layers(bdlh1 = LSTM(32, activation='tanh', return_sequences=True))(bdlh),


  tf.keras.layers(bdrf = concatenate([bd1, rf1],axis=-1)),
  tf.keras.layers(bdrf1 = LSTM(32, activation='tanh', return_sequences=True))(bdrf),


  tf.keras.layers(bdlf = concatenate([bd1, lf1],axis=-1)),
  tf.keras.layers(bdlf1 = LSTM(32, activation='tanh', return_sequences=True))(bdlf),

  tf.keras.layers(upbody = concatenate([bdrh1, bdlh1],axis=-1)),
  tf.keras.layers(upbody1 =LSTM(32, activation='tanh', return_sequences=True))(upbody),


  tf.keras.layers(downbody = concatenate([bdrf1, bdlf1],axis=-1)),
  tf.keras.layers(downbody1 = LSTM(32, activation='tanh', return_sequences=True))(downbody),

  tf.keras.layers(body = concatenate([upbody1, downbody1],axis=-1)),
  tf.keras.layers(body1 = LSTM(8, activation='tanh'))(body),

  tf.keras.laayers(out = Dense(60, activation='softmax'))(body1),

  tf.keras.layers(model = Model([bdbd, rhrh, lhlh, rfrf, lflf]), out),

  ])

File "<ipython-input-367-2708f0ec1ea2>", line 105
      ])
      ^
  SyntaxError: invalid syntax


What I have tried:

(OP has tried nothing, it would seem.)
Posted
Updated 9-Jun-21 23:33pm
v2

Why does the line above end with a comma? I'm pretty sure it shouldn't ...
 
Share this answer
 
 
Share this answer
 
Comments
amir elmjamili 10-Jun-21 13:50pm    
This system works in parallel and unfortunately your solution does not work
Thank you for your suggestion
Richard MacCutchan 10-Jun-21 15:00pm    
Given that you did not ask a question there was nothing more that we could suggest.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900