
    Ngy                     J    d dl Zd dlZd dlmZ d dlmZ  G d de          ZdS )    N)Base)expectc                   V    e Zd Zedd            Zedd            Zedd            ZdS )ClipreturnNc                     t           j                            dg ddg          } t          j        g d                              t          j                  }t          j        d          }t          j        d          }t          j        |||          }t          | |||g|gd	           t          j	        
                    d
dd                              t          j                  }t          j        |||          }t          | |||g|gd	           t           j                            dg ddg          } t          j        d          }t          j        d          }t          j        g d                              t          j                  }t          j        g d                              t          j                  }t          | |||g|gd	           t          j        g d                              t          j                  }t          j        g d                              t          j                  }t          | |||g|gd	           t          j        g d                              t          j                  }t          j        g d                              t          j                  }t          | |||g|gd	           d S )Nr   )xminmaxyinputsoutputs)r         test_clip_exampler   r   name         	test_clipr   r   r   test_clip_inbounds)ir      )r   r   r   test_clip_outbounds)r   r   r   )r   r   r   test_clip_splitbounds)onnxhelper	make_nodenparrayastypefloat32clipr   randomrandn)noder	   min_valmax_valr   s        \/var/www/html/ai-engine/env/lib/python3.11/site-packages/onnx/backend/test/case/node/clip.pyexportzClip.export   s   {$$&&&E % 
 
 HZZZ  ''
33*R..*Q--GAw((!Wg.BU	
 	
 	
 	
 IOOAq!$$++BJ77GAw((tQ1A3[QQQQ{$$&&&E % 
 
 *R..*Q--HZZZ  ''
33HZZZ  ''
33!Wg.BV	
 	
 	
 	
 HZZZ  ''
33HZZZ  ''
33!Wg.BW	
 	
 	
 	
 HZZZ  ''
33HZZZ  ''
33w(C(		
 	
 	
 	
 	
 	
    c                     t           j                            dddgdg          } t          j        d          }t          j                            ddd	                              t          j                  }t          j        ||t          j	                  }t          | ||g|gd
           d}t           j                            dd|dgdg          } t          j        d          }t          j                            ddd	                              t          j                  }t          j        |t          j	         |          }t          | ||g|gd           d}t           j                            dd||gdg          } t          j        g d                              t          j                  }t          j        g d                              t          j                  }t          | |g|gd           d S )Nr   r	   r
   r   r   r   r   r   r   test_clip_default_minr    r   test_clip_default_maxr   test_clip_default_inbounds)r!   r"   r#   r$   r'   r)   r*   r&   r(   infr   r%   r+   r,   r	   r   no_minr-   no_maxs          r.   export_clip_defaultzClip.export_clip_default>   s   {$$<E % 
 

 *Q--IOOAq!$$++BJ77GAw''tQL1#<STTTT{$$'E % 
 

 *Q--IOOAq!$$++BJ77GAw((tQL1#<STTTT{$$(E % 
 
 HZZZ  ''
33HZZZ  ''
33tQC!3OPPPPPPr0   c                  b   t           j                            dddgdg          } t          j        d          }t          j                            ddd	                              t          j                  }t          j        ||t          j	        t          j                  j
                  }t          | ||g|gd
           d}t           j                            dd|dgdg          } t          j        d          }t          j                            ddd	                              t          j                  }t          j        |t          j	        t          j                  j        |          }t          | ||g|gd           d}t           j                            dd||gdg          } t          j        g d                              t          j                  }t          j        g d                              t          j                  }t          | |g|gd           d S )Nr   r	   r
   r   r   r   r   r   r   test_clip_default_int8_minr   r3   r   test_clip_default_int8_maxr   test_clip_default_int8_inbounds)r!   r"   r#   r$   int8r)   r*   r&   r(   iinfor   r   r
   r%   r7   s          r.   export_clip_default_int8zClip.export_clip_default_int8`   s   {$$<E % 
 

 '!**IOOAq!$$++BG44GAw 1 1 566!Ws9U	
 	
 	
 	
 {$$'E % 
 

 '!**IOOAq!$$++BG44GArx((,g66!Ws9U	
 	
 	
 	
 {$$(E % 
 
 HZZZ  ''00HZZZ  ''00tQC!3TUUUUUUr0   )r   N)__name__
__module____qualname__staticmethodr/   r:   rA    r0   r.   r   r      s~        .
 .
 .
 \.
` Q Q Q \QB #V #V #V \#V #V #Vr0   r   )numpyr$   r!   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   rF   r0   r.   <module>rJ      s   
      , , , , , , . . . . . .xV xV xV xV xV4 xV xV xV xV xVr0   