
    Z jS                     ~   S r SSKJr  SSKrSSKJr  SSKJr  SSKJr	  SSK
JrJr  SS	KJr  SS
KJr  SSKJr  SSKJrJr  SSKJrJrJrJrJr  SSKJr  SSKJr  SSK J!r!  SSK"J#r#J$r$  \" SS9\ " S S\5      5       5       r% " S S\SS9r& " S S\!5      r' " S S\#5      r( " S S \RR                  5      r* " S! S"\5      r+ " S# S$\RR                  5      r, " S% S&\RR                  5      r- " S' S(\RR                  5      r. " S) S*\RR                  5      r/\ " S+ S,\5      5       r0\" S-S.9 " S/ S0\05      5       r1/ S1Qr2g)2u9   CHMv2 model — Canopy Height Model v2, adapted from DPT.    )LiteralN)strict)nn   )initialization)%consolidate_backbone_kwargs_to_configload_backbone)PreTrainedConfig)DepthEstimatorOutput)PreTrainedModel)ImagesKwargsUnpack)
TensorTypeTransformersKwargsauto_docstringcan_return_tuplerequires_backends   )
AutoConfig) DepthAnythingPreActResidualLayer)DPTImageProcessor)DPTReassembleLayer_get_backbone_hidden_sizez%facebook/dinov3-vitl16-chmv2-dpt-head)
checkpointc                   &  ^  \ rS rSr% SrSrS\0rSr\	\
-  S-  \S'   Sr\\S'   Sr\\S	'   Sr\\\-     S-  \S
'   Sr\\   S-  \S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\S   \S'   Sr\S   \S'   U 4S jrSrU =r$ )CHMv2Config%   a%  
backbone_config (`Union[dict, "PreTrainedConfig"]`, *optional*):
    The configuration of the backbone model. Only DINOv3ViTConfig is currently supported.
patch_size (`int`, *optional*, defaults to 16):
    The patch size used by the backbone vision transformer.
reassemble_factors (`list[float]`, *optional*, defaults to `[4, 2, 1, 0.5]`):
    The up/downsampling factors of the reassemble layers.
post_process_channels (`list[int]`, *optional*, defaults to `[128, 256, 512, 1024]`):
    The output channel sizes of the reassemble stage for each backbone feature level.
fusion_hidden_size (`int`, *optional*, defaults to 256):
    The number of channels before fusion.
head_hidden_size (`int`, *optional*, defaults to 128):
    The number of channels in the hidden layer of the depth estimation head.
number_output_channels (`int`, *optional*, defaults to 256):
    Number of output channels for the CHMv2 head (number of depth bins).
readout_type (`str`, *optional*, defaults to `"project"`):
    Type of readout operation for the CLS token. One of `["ignore", "add", "project"]`.
min_depth (`float`, *optional*, defaults to 0.001):
    The minimum depth value for depth bin calculation.
max_depth (`float`, *optional*, defaults to 96.0):
    The maximum depth value for depth bin calculation.
bins_strategy (`str`, *optional*, defaults to `"chmv2_mixlog"`):
    The strategy for depth bins distribution. One of `["linear", "log", "chmv2_mixlog"]`.
norm_strategy (`str`, *optional*, defaults to `"chmv2_mixlog"`):
    The normalization strategy for depth prediction. One of `["linear", "softmax", "sigmoid", "chmv2_mixlog"]`.

```python
>>> from transformers import CHMv2Config, CHMv2ForDepthEstimation

>>> configuration = CHMv2Config()
>>> model = CHMv2ForDepthEstimation(configuration)
>>> configuration = model.config
```
chmv2backbone_configN   
patch_sizeg{Gz?initializer_rangereassemble_factorspost_process_channels   fusion_hidden_size   head_hidden_sizenumber_output_channelsprojectreadout_typegMbP?	min_depthg      X@	max_depthchmv2_mixlog)linearlogr.   bins_strategy)r/   softmaxsigmoidr.   norm_strategyc                    > U R                   c	  / SQU l         U R                  c	  / SQU l        SSSSSSS	/ S
QS	S	SS	S.n[        SU R                  SUS.UD6u  U l        n[        TU ]  " S0 UD6  g )N)   r      g      ?)r'   r%   i      i  r8   i   r       r6   T)         r9   gư>)
image_sizehidden_sizeintermediate_sizenum_attention_headsnum_hidden_layersnum_register_tokenskey_biasout_indicesreshape_hidden_statesapply_layernormlayer_norm_epsreturn_class_token
dinov3_vit)r   default_config_typedefault_config_kwargs )r#   r$   r   r   super__post_init__)selfkwargsrK   	__class__s      x/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/chmv2/modular_chmv2.pyrN   CHMv2Config.__post_init__\   s    ""*&4D#%%-)>D& !%#%!##$*%)#""&!
 (M (
 00 ,"7(
 	(
$f 	''    )r   r$   r#   ) __name__
__module____qualname____firstlineno____doc__
model_typer   sub_configsr   dictr
   __annotations__r!   intr"   floatr#   listr$   r&   r(   r)   r+   strr,   r-   r1   r   r4   rN   __static_attributes____classcell__rQ   s   @rR   r   r   %   s    !F J$j1K6:OT,,t3:J#u#37US[)D07.249t+2!!c"%C%!L#!IuIu>LM7:;LM[M7IJ[( (rT   r   c                   B    \ rS rSr% Sr\\S'   \\S'   \\S'   \\S'   Srg)	CHMv2ImageProcessorKwargs{   a  
ensure_multiple_of (`int`, *optional*, defaults to 1):
    If `do_resize` is `True`, the image is resized to a size that is a multiple of this value. Can be overridden
    by `ensure_multiple_of` in `preprocess`.
keep_aspect_ratio (`bool`, *optional*, defaults to `False`):
    If `True`, the image is resized to the largest possible size such that the aspect ratio is preserved. Can
    be overridden by `keep_aspect_ratio` in `preprocess`.
do_reduce_labels (`bool`, *optional*, defaults to `self.do_reduce_labels`):
    Whether or not to reduce all label values of segmentation maps by 1. Usually used for datasets where 0
    is used for background, and background itself is not included in all classes of a dataset (e.g.
    ADE20k). The background label will be replaced by 255.
ensure_multiple_ofsize_divisorkeep_aspect_ratiodo_reduce_labelsrL   N)	rU   rV   rW   rX   rY   r^   r]   boolrb   rL   rT   rR   rf   rf   {   s!     rT   rf   F)totalc            
           \ rS rSrSrSrSrSrSr/ SQr	/ SQr
\r SSS	S
\\\\\4      -  S-  S-  S\\\\4      4S jjrSrg)CHMv2ImageProcessor   FTr    )gzG?gM?gl?)g$C?g+?gM?Noutputsr   target_sizesreturnc                 x   [        U S5        UR                  nUb#  [        U5      [        U5      :w  a  [        S5      e/ nUc  S/[        U5      -  OUn[	        X25       HV  u  pVUb;  [
        R                  R                  R                  US   USSS9R                  5       nUR                  SU05        MX     U$ )	aj  
Converts the raw output of [`DepthEstimatorOutput`] into final depth predictions and depth PIL images.
Only supports PyTorch.

Args:
    outputs ([`DepthEstimatorOutput`]):
        Raw outputs of the model.
    target_sizes (`TensorType` or `List[Tuple[int, int]]`, *optional*):
        Tensor of shape `(batch_size, 2)` or list of tuples (`Tuple[int, int]`) containing the target size
        (height, width) of each image in the batch. If left to None, predictions will not be resized.

Returns:
    `List[Dict[str, TensorType]]`: A list of dictionaries of tensors representing the processed depth
    predictions.
torchNz]Make sure that you pass in as many target sizes as the batch dimension of the predicted depth)NN.bilinearTsizemodealign_cornerspredicted_depth)r   r{   len
ValueErrorzipru   r   
functionalinterpolatesqueezeappend)rO   rq   rr   r{   resultsdepthtarget_sizes          rR   post_process_depth_estimation1CHMv2ImageProcessor.post_process_depth_estimation   s    ( 	$(!11$3+?3|CT+To  8D8LvO 44R^"%o"DE&++77/*:]a 8 ')  NN-u56 #E rT   rL   N)rU   rV   rW   rX   	do_resizedo_padri   rh   rj   
image_mean	image_stdrf   valid_kwargsr   r`   tupler^   r\   ra   r   rb   rL   rT   rR   ro   ro      s    IFL&J%I,L
 JN''' !4c3h#884?$F' 
d3
?#	$	' 'rT   ro   c                       \ rS rSrSrg)CHMv2ReassembleLayer   rL   NrU   rV   rW   rX   rb   rL   rT   rR   r   r          rT   r   c                   ~   ^  \ rS rSrSrS\4U 4S jjrS	S\\R                     S\\R                     4S jjr
SrU =r$ )
CHMv2ReassembleStage   z
Reassemble stage that processes hidden states from the backbone into image-like feature
representations at various resolutions.
configc           	        > [         TU ]  5         Xl        UR                  U l        [        R
                  " 5       U l        [        UR                  UR                  5       H)  u  p#U R                  R                  [        UUUS95        M+     [        U5      nU R                  S:X  a  [        R
                  " 5       U l        [        [        U R                  5      5       H^  nU R                  R                  [        R                   " [        R"                  " SU-  U5      [        R$                  " 5       5      5        M`     g g )N)r   channelsfactorr*   r   )rM   __init__r   r+   r   
ModuleListlayersr~   r$   r#   r   r   r   readout_projectsranger|   
SequentialLinearGELU)rO   r   out_channelsr   r>   _rQ   s         rR   r   CHMv2ReassembleStage.__init__   s    "//mmo$'(D(DfF_F_$` LKK$!)! %a 07	)$&MMOD!3t{{+,%%,,R]]299Q_Va;bdfdkdkdm-no - *rT   hidden_statesrs   c                    / n[        U5       GH  u  pV[        U[        [        45      (       Ga  [	        U5      S:X  a  US   US   pvUR
                  nU R                  S:X  a  UR                  S5      R                  SS5      nUR                  S5      R                  U5      n	U R                  U   " [        R                  " Xi4S5      5      nUR                  SSS5      R                  U5      nOU R                  S:X  a4  UR                  S5      UR                  S5      -   nUR                  U5      nObUR!                  5       S:X  aN  US S 2SS 24   nUR
                  u  pnUR                  XX<5      nUR                  SSSS5      R#                  5       nU R$                  U   " U5      nUR'                  U5        GM     U$ )Nr   r   r7   r*   addr   )	enumerate
isinstancer   r`   r|   shaper+   flatten	transpose	unsqueeze	expand_asr   ru   catpermutereshapedim
contiguousr   r   )rO   r   patch_heightpatch_widthout	layer_idxhidden_state	cls_tokenfeature_shapereadout
batch_sizer   num_channelss                rR   forwardCHMv2ReassembleStage.forward   s   '0'?#I,663|;LPQ;Q*6q/<?i , 2 2$$	1#/#7#7#:#D#DQ#JL'11!4>>|LG#'#8#8#CEII|NegiDj#kL#/#7#71a#@#H#H#WL&&%/#/#7#7#:Y=P=PQS=T#TL#/#7#7#FL##%*#/12#6L2>2D2D/J<#/#7#7
R]#lL#/#7#71a#C#N#N#PL;;y1,?LJJ|$+ (@. 
rT   )r   r   r   r+   NN)rU   rV   rW   rX   rY   r   r   r`   ru   Tensorr   rb   rc   rd   s   @rR   r   r      sD    
p{ p*T%,,%7 aefkfrfras  rT   r   c                       \ rS rSrSrg)CHMv2PreActResidualLayer   rL   Nr   rL   rT   rR   r   r      r   rT   r   c                   B   ^  \ rS rSrSS\S\4U 4S jjjrSS jrSrU =r	$ )	CHMv2FeatureFusionLayeri  r   is_first_layerc                    > [         TU ]  5         X l        [        R                  " UR
                  UR
                  SSS9U l        U(       d  [        U5      U l        [        U5      U l	        g )Nr7   T)kernel_sizebias)
rM   r   r   r   Conv2dr&   
projectionr   residual_layer1residual_layer2)rO   r   r   rQ   s      rR   r    CHMv2FeatureFusionLayer.__init__  sU    ,))F$=$=v?X?Xfgnrs#;F#CD 7?rT   c                    Ubo  U R                   (       d^  UR                  UR                  :w  a1  UR                  u    pEn[        R                  R	                  X%U4SSS9nXR                  U5      -   nU R                  U5      nUc  SS0OSU0n[        R                  R                  " U40 UDSSS.D6nU R                  U5      nU$ )	Nrv   Frw   scale_factorr   rx   T)ry   rz   )r   r   r   r   r   r   r   r   )rO   r   residualrx   r   heightwidthmodifiers           rR   r   CHMv2FeatureFusionLayer.forward  s    (;(;!!X^^3&2&8&8#1e==44E?SX 5  (*>*>x*HHL++L9*.,NA&VTN}}00

 	
 |4rT   )r   r   r   r   )Fr   )
rU   rV   rW   rX   r   rl   r   r   rb   rc   rd   s   @rR   r   r     s)    	@{ 	@D 	@ 	@ rT   r   c                   6   ^  \ rS rSrSrSU 4S jjrS rSrU =r$ )CHMv2UpsampleConvHeadi(  z
Convolutional head with intermediate upsampling.

Architecture: Conv3x3 -> 2x bilinear upsample -> Conv3x3 -> ReLU -> Conv1x1.
c                 <  > [         TU ]  5         [        R                  " [        R                  " XS-  SSSS9[        R
                  " SSSS9[        R                  " US-  USSSS9[        R                  " 5       [        R                  " X2SSSS9/5      U l        g )	Nr   r   r7   )r   stridepaddingrv   T)r   ry   rz   r   )rM   r   r   r   r   UpsampleReLUhead)rO   featuresr)   n_hidden_channelsrQ   s       rR   r   CHMv2UpsampleConvHead.__init__/  s    MM		(MqTUV4P		(a-):RS]^_			+QR[\fgh
	rT   c                 <    U R                    H  nU" U5      nM     U$ r   r   )rO   r   layers      rR   r   CHMv2UpsampleConvHead.forward;  s     YYE!-0M rT   r   )r'   )	rU   rV   rW   rX   rY   r   r   rb   rc   rd   s   @rR   r   r   (  s    

 rT   r   c                      ^  \ rS rSrSrS\4U 4S jjrS\\R                     S\
S\
S\R                  4S	 jrS\\R                     S\
S\
S\R                  4S
 jrSrU =r$ )	CHMv2HeadiA  z
CHMv2 dense-prediction head adapted from DPT.

Integrates reassemble, projection convs, feature fusion, and UpConv depth head.
r   c                 @  > [         TU ]  5         Xl        [        U5      U l        [
        R                  " 5       U l        UR                   H=  nU R                  R                  [
        R                  " X!R                  SSSS95        M?     [
        R                  " 5       U l        [        [        UR                  5      5       H(  nU R                  R                  [        XS:H  S95        M*     [!        UR                  UR"                  UR$                  S9U l        g )Nr   r7   F)r   r   r   r   )r   )r   r)   r   )rM   r   r   r   reassemble_stager   r   convsr$   r   r   r&   fusion_layersr   r|   r   r   r)   r(   
conv_depth)rO   r   channelidxrQ   s       rR   r   CHMv2Head.__init__H  s     4V <]]_
33GJJbii1J1JXYcdkpqr 4  ]]_V99:;C%%&=f]^V^&`a < 0..#)#@#@$55
rT   r   r   r   rs   c                 f   U R                  XU5      n[        U5       VVs/ s H  u  pEU R                  U   " U5      PM     nnnUR                  5         U R                  S   " US   5      n[        S[        U R                  5      5       H  nU R                  U   " XvU   5      nM     U$ s  snnf )Nr   r7   )r   r   r   reverser   r   r|   )rO   r   r   r   ifeaturer   fused_hidden_states           rR   forward_featuresCHMv2Head.forward_features\  s    --m;W=F}=UV=UzqDJJqM'*=UV!//28A;?q#d0012A!%!3!3A!67ITU;!W 3 "! Ws   !B-c                 L    U R                  XU5      nU R                  U5      nU$ r   )r   r   )rO   r   r   r   r   s        rR   r   CHMv2Head.forwardh  s'    ##MMooc"
rT   )r   r   r   r   r   )rU   rV   rW   rX   rY   r   r   r`   ru   r   r^   r   r   rb   rc   rd   s   @rR   r   r   A  s~    
{ 
(
"d5<<.@ 
"PS 
"be 
"jojvjv 
"T%,,%7 s Y\ afamam  rT   r   c                      ^  \ rS rSrSrS\4U 4S jjrS\S\R                  S\R                  4S jrS	\R                  S
\R                  S\R                  4S jrS\R                  S\R                  4S jrSrU =r$ )CHMv2FeaturesToDepthin  zJConverts raw logits from the CHMv2 head into a depth map using depth bins.r   c                    > [         TU ]  5         UR                  U l        UR                  U l        UR                  U l        UR
                  U l        SU l        SU l        SU l        g )Ng-C6?g:0yE>g-q=)	rM   r   r,   r-   r1   r4   _mixlog_max_clamp_value_mixlog_eps_shift_mixlog_epsrO   r   rQ   s     rR   r   CHMv2FeaturesToDepth.__init__q  s\    ))))#11#11'+$!% rT   n_binsdevicers   c                    U R                   S-  n[        R                  " U R                  X1US9n[        R                  " [        R                  " [        R
                  " [        R                  " U R                  US95      [        R
                  " [        R                  " X2S95      UUS95      n[        R                  " SSXS9nXe-  SU-
  U-  -   nU$ )z
Creates mixed log bins interpolated between linear and log distributions.

The max_depth is divided by 8.0 internally; this scaling is reversed in
`_create_outputs_with_mixlog_norm` by multiplying by 8.0.
       @r        ?        )r-   ru   linspacer,   expr0   tensor)rO   r  r  scaled_max_depthr/   r0   interp_weightbinss           rR   _create_mixlog_bins(CHMv2FeaturesToDepth._create_mixlog_bins{  s      >>C/0@QWXiiNN		%,,t~~fEF		%,,'7GH	
 sCG"cM&9V%CCrT   inputr  c                    [         R                  " U5      nUR                  SSS9nU* R                  S5      R	                  U R
                  5      U R                  -   nX5-   nUR                  SSS9n[         R                  " USSSS9R                  U R                  5      nXg-  nUR                  SSSS5      R                  U R                  5      n	X-  R                  SSS9R                  U R                  5      n
U
S-  n
U
$ )	zEConverts depth bin logits to depth values using mixlog normalization.r7   Tr   keepdimr	  r  )nanposinfneginfr   r  )ru   reluamin	clamp_min	clamp_maxr   r   sum
nan_to_numr   view)rO   r  r  logitsmin_per_sampleshift
logits_posdenomweightsbins_broadcastoutputs              rR    _create_outputs_with_mixlog_norm5CHMv2FeaturesToDepth._create_outputs_with_mixlog_norm  s    E"D9 ++C0::4;W;WX[_[q[qq^
1d3  CCHRRSWScScd$1b!Q/99$:J:JK*//At/DNNtO_O_`#rT   xc                 @   UR                   S   nUS:  Ga  U R                  S:X  a5  [        R                  " U R                  U R
                  X!R                  S9nOU R                  S:X  a  [        R                  " [        R                  " [        R                  " U R                  5      5      [        R                  " [        R                  " U R
                  5      5      UUR                  S9n[        R                  " U5      nOU R                  X!R                  5      nU R                  S;   a  U R                  S:X  a/  [        R                  " U5      nSnXE-   nXDR                  SSS9-  nONU R                  S	:X  a  [        R                  " USS
9nO([        R                  " U5      nXDR                  SSS9-  n[        R                   " SXC/5      R#                  SS
9nU$ U R%                  X5      n U$ [        R                  " U5      U R                  -   nU$ )Nr7   r/   r  r0   )r/   r2   r3   g?Tr  r2   r   zikmn,k->imn)r   r1   ru   r
  r,   r-   r  r0   r  r  r  r4   r  r  r2   r3   einsumr   r(  )rO   r*  r  r  logitepsr'  s          rR   r   CHMv2FeaturesToDepth.forward  s   A:!!X-~~dnndnnfU]U]^##u,~~IIell4>>:;IIell4>>:;88	 yy//A!!%EE%%1!JJqMEC!KE!II!TI$BBE''94!MM!3E!MM!,E!II!TI$BBEme]CMMRSMT 	 >>qG  ZZ]T^^3FrT   )r   r   r   r1   r-   r,   r4   )rU   rV   rW   rX   rY   r   r   r^   ru   r  r   r  r(  r   rb   rc   rd   s   @rR   r   r   n  s}    T!{ !# u||  *ell %,, [`[g[g &" "%,, " "rT   r   c                   X   ^  \ rS rSr% \\S'   SrSrSrSr	Sr
SrSrSrS	U 4S jjrSrU =r$ )
CHMv2PreTrainedModeli  r   r   pixel_values)imageTc                 f  > [         TU ]  U5        [        U[        R                  [        R
                  [        R                  45      (       ac  [        R                  " UR                  SU R                  R                  S9  UR                  b!  [        R                  " UR                  5        g g g )Nr	  )meanstd)rM   _init_weightsr   r   r   r   ConvTranspose2dinittrunc_normal_weightr   r"   r   zeros_)rO   modulerQ   s     rR   r8  "CHMv2PreTrainedModel._init_weights  sw    f%fryy"))R5G5GHIIv}}3DKK<Y<YZ{{&FKK( ' JrT   rL   )rs   N)rU   rV   rW   rX   r   r]   base_model_prefixmain_input_nameinput_modalitiessupports_gradient_checkpointing_supports_sdpa_supports_flash_attn_supports_flex_attn_supports_attention_backendr8  rb   rc   rd   s   @rR   r2  r2    sA    $O!&*#N"&) )rT   r2  z
    CHMv2 Model with a depth estimation head on top (consisting of convolutional layers) e.g. for canopy height
    estimation.
    )custom_introc                      ^  \ rS rSrS\4U 4S jjrS r\\ SS\	R                  S\	R                  S-  S\\   S	\4S
 jj5       5       rSrU =r$ )CHMv2ForDepthEstimationi  r   c                    > [         TU ]  U5        [        U5      U l        [	        U5      U l        [        U5      U l        U R                  5         g r   )	rM   r   r	   backboner   r   r   features_to_depth	post_initr  s     rR   r    CHMv2ForDepthEstimation.__init__  s?     %f-f%	!5f!=rT   c                 6    U R                   R                  5       $ r   )rL  get_input_embeddings)rO   s    rR   rQ  ,CHMv2ForDepthEstimation.get_input_embeddings  s    }}1133rT   Nr3  labelsrP   rs   c                    SnUb  [        S5      eUR                  u    pVnU R                  R                  nXh-  n	Xx-  n
U R                  " U40 UD6n[        [        UR                  UR                  5      5      nU R                  XU
5      nU R                  U5      nUR                  SS9n[        UUUR                  UR                  S9$ )z
labels (`torch.LongTensor` of shape `(batch_size, height, width)`, *optional*):
    Ground truth depth estimation maps for computing the loss.
NzTraining is not implemented yetr7   r,  )lossr{   r   
attentions)NotImplementedErrorr   r   r!   rL  r`   r~   feature_maps
cls_tokensr   rM  r   r   r   rV  )rO   r3  rS  rP   rU  r   r   r   r!   r   r   backbone_outputintermediate_featureshead_outputr{   s                  rR   r   CHMv2ForDepthEstimation.forward  s     %&GHH*001e[[++
+)--?? $S)E)EGaGa%b cii 5[Q00=)11a18#+)77&11	
 	
rT   )rL  rM  r   r   )rU   rV   rW   rX   r   r   rQ  r   r   ru   FloatTensor
LongTensorr   r   r   r   rb   rc   rd   s   @rR   rJ  rJ    sr    { 4  +/ 
'' 
   4' 
 +,	 

 
 
   
rT   rJ  )r   ro   rJ  r2  )3rY   typingr   ru   huggingface_hub.dataclassesr   r    r   r:  backbone_utilsr   r	   configuration_utilsr
   modeling_outputsr   modeling_utilsr   processing_utilsr   r   utilsr   r   r   r   r   autor   &depth_anything.modeling_depth_anythingr   dpt.image_processing_dptr   dpt.modeling_dptr   r   r   rf   ro   r   Moduler   r   r   r   r   r   r2  rJ  __all__rL   rT   rR   <module>ro     sC   @   .  & R 3 4 - 4 h h  9 L BCQ(" Q(  DQ(hE (1+ 1h	- 	5299 5p	? 	"bii "JBII 2*		 *ZW299 Wt )? ) )& /
2 /
/
drT   