Add a test to test saving and loading the gesture recognizer model.
Also update the loss function init method to resolve a bug when loading model. PiperOrigin-RevId: 482702020
This commit is contained in:
		
							parent
							
								
									086fc442fd
								
							
						
					
					
						commit
						348c4e6652
					
				| 
						 | 
					@ -56,7 +56,7 @@ class FocalLoss(tf.keras.losses.Loss):
 | 
				
			||||||
      class_weight: A weight to apply to the loss, one for each class. The
 | 
					      class_weight: A weight to apply to the loss, one for each class. The
 | 
				
			||||||
        weight is applied for each input where the ground truth label matches.
 | 
					        weight is applied for each input where the ground truth label matches.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    super(tf.keras.losses.Loss, self).__init__()
 | 
					    super().__init__()
 | 
				
			||||||
    # Used for clipping min/max values of probability values in y_pred to avoid
 | 
					    # Used for clipping min/max values of probability values in y_pred to avoid
 | 
				
			||||||
    # NaNs and Infs in computation.
 | 
					    # NaNs and Infs in computation.
 | 
				
			||||||
    self._epsilon = 1e-7
 | 
					    self._epsilon = 1e-7
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user