
    Ph                     L    d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d Z
d Zy)	    )GraphDef)NodeDef)
VersionDef)	AttrValue)TensorShapeProtoc                 Z    dd l }|j                  |       }|j                  }t        |      S )Nr   )onnxloadgraphparse)fnamer	   mgs       nC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\torch/utils/tensorboard/_onnx_graph.pyload_onnx_graphr      s%    		%A	A8O    c                    g }g }dd l }|j                  | j                  | j                        D ]  }|j	                  |        |D ]  }t        |j                         t        |j                  j                  j                  j                  D cg c]"  }t        j                  |j                        $ c}      }|j	                  t        |j                  j                  d      dg t!        |j                  j                  j"                        t!        |      d	
              | j$                  D ]  }g }|j&                  D ]J  }|j	                  dj)                  |j+                         D 	cg c]  }	t-        |	d          c}	             L dj)                  |      j                  d      }
t        |j                  d          |j	                  t        |j                  d   j                  d      |j.                  |j                  dt!        |
      i
              i }|D ]+  }|j0                  dz   |j                  z   ||j                  <   - t3        |t5        d            S c c}w c c}	w )Nr   )size)dimutf_8)encodingVariable)type)shape)dtyper   )nameopinputattrz =    z, 
parameters)s_   )producer)nodeversions)	itertoolschainr   outputappendprintr   r   r   tensor_typer   r   Dim	dim_valuer   encoder   	elem_typer&   	attributejoin
ListFieldsstrop_typer   r   r   )r   nodes_protonodesr(   r&   d
shapeproto_attrr"   fr   mappings               r   r   r      s   KEU\\:4  ; dii% ..44888A !$$!++68

 	YY%%w%7&DII,A,A,K,KL&Z8	
	
 ( 

ALL$G1S1Y$GHI  yy&&&8dkk!n[[^**G*<<<jj"I$56		
   G!WWs]TYY6		  R)@AAK( %Hs   'I7
6I<N)"tensorboard.compat.proto.graph_pb2r   %tensorboard.compat.proto.node_def_pb2r   %tensorboard.compat.proto.versions_pb2r   'tensorboard.compat.proto.attr_value_pb2r   )tensorboard.compat.proto.tensor_shape_pb2r   r   r    r   r   <module>rD      s    7 9 < = F0Br   