Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

keras model 2 outputs

inputs = Input(shape=(3,))
x = Dense(16, activation='relu')(inputs)
x = Dense(32, activation='relu')(x)
output1 = Dense(1)(x)
output2 = Dense(3, activation='softmax')(x)

model = Model(inputs=inputs, outputs=[output1, output2])

model.compile(loss=['mae', 'sparse_categorical_crossentropy'], optimizer='adam')

history = model.fit(X, [Y, Z], epochs=10, batch_size=8)
Comment

PREVIOUS NEXT
Code Example
Python :: phython to c converter 
Python :: python comments 
Python :: time zone 
Python :: get maximum value index after groupby 
Python :: create array with shape 0,2 
Python :: database with python connection 
Python :: Python Pandas - How to write in a specific column in an Excel Sheet 
Python :: convert rgb image to binary in pillow 
Python :: python file get text by regular expression 
Python :: import file in another path python 
Python :: convert image to binary python 
Python :: how to remove text from plot in python 
Python :: how to add values in python 
Python :: django model functions 
Python :: NumPy flipud Example 
Python :: checking length of sets in python 
Python :: how to run python code in python 
Python :: char list python 
Python :: python create null matrix 
Python :: python qr scanner 
Python :: linux python 
Python :: python test coverage 
Python :: how to get a list of all variables in memory python 
Python :: tree implementation in python 
Python :: python basic programs 
Python :: tables in jinja template 
Python :: pd.cut in pandas 
Python :: loading bar 
Python :: refer dataframe with row number and column name 
Python :: django url with slug 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =