pythontensorflowlabview

How to know the input node names of the frozen model in tensorflow


I am making a Deep Learning model and need to use it in LabView DL module. but it need the input node and output node names how to find them please help me. enter image description here

i tried to use some code to find the node names but iam not getting them


Solution

  • You can use model.summary() to get all the names of the layers present in the model.For example

    model=keras.Sequential([
                            keras.Input(shape=(28,28,1)),
                            keras.layers.Conv2D(32,kernel_size=(3,3),activation='relu'),
                            keras.layers.MaxPooling2D(pool_size=(2,2)),
                            keras.layers.Conv2D(64,kernel_size=(3,3),activation='relu'),
                            keras.layers.MaxPooling2D(pool_size=(2,2)),
                            keras.layers.Flatten(),
                            keras.layers.Dropout(0.5),
                            keras.layers.Dense(10,activation='softmax')])
    
    
    model.summary()
    
    Model: "sequential"
    _________________________________________________________________
     Layer (type)                Output Shape              Param #   
    =================================================================
     conv2d (Conv2D)             (None, 26, 26, 32)        320       
                                                                     
     max_pooling2d (MaxPooling2D  (None, 13, 13, 32)       0         
     )                                                               
                                                                     
     conv2d_1 (Conv2D)           (None, 11, 11, 64)        18496     
                                                                     
     max_pooling2d_1 (MaxPooling  (None, 5, 5, 64)         0         
     2D)                                                             
                                                                     
     flatten (Flatten)           (None, 1600)              0         
                                                                     
     dropout (Dropout)           (None, 1600)              0         
                                                                     
     dense (Dense)               (None, 10)                16010     
                                                                     
    =================================================================
    Total params: 34,826
    Trainable params: 34,826
    Non-trainable params: 0
    __________________________________
    

    The names under the layer column are the names of the layer. Thank You.