Dragon API Dragon v0.3.0 Python Net¶ class dragon.vm.caffe.Net( network_file, phase='TEST', weights=None)[source]¶ Base network class to connect layers. __init__¶ Net.__init__( network_file, phase='TEST', weights=None)[source]¶ Create a Net. Parameters: network_file (str) – The path of text proto file to load network. phase (str, optional, default='TEST') – The execution phase. weights (str, optional) – The path of binary proto file to load weights. Properties¶ blobs¶ Net.blobs¶ Return the blob dict. Returns:dict – The blob dict. inputs¶ Net.inputs¶ Return the input blob names. Returns:Sequence[str] – The input names. outputs¶ Net.outputs¶ Return the output blob names. Returns:Sequence[str] – The output names. params¶ Net.params¶ Return the parameter dict. Returns:dict – The parameter dict. Methods¶ copy_from¶ Net.copy_from(other)[source]¶ Copy layers from the other. Parameters: other (Union[str, NetParameter]) – The path of binary proto file or NetParameter. forward¶ Net.forward(**kwargs)[source]¶ The forward pass. save¶ Net.save(filepath)[source]¶ Save proto into a binary file. Parameters: filepath (str) – The path of binary proto file.