Dfp#
- class Dfp(path_or_bytes)#
A container class for the DFP that provides easy access to metadata like input/output shapes, number of MXAs etc.
- Parameters:
- path_or_bytes: str/pathlib.Path
Path to a .dfp file or DFP bytearray
- property version#
Returns the DFP version
- property num_inports#
Returns the number of active/used input ports
- property num_outports#
Returns the number of active/used output ports
- property input_shapes#
Returns a list of feature map shapes of the active/used input ports
- property input_ports#
Returns a dictionary of metadata of the active/used input ports
- property output_ports#
Returns a dictionary of metadata of the active/used output ports
- property output_shapes#
Returns a list of feature map shapes of the active/used output ports
- property num_chips#
Returns the number of MXAs the DFP was compiled for
- property chip_gen#
Returns the generation of the MXA the DFP was compiled for
- property models#
Returns a list of paths/type information of the models compiled in the DFP
- write(fname)#
Writes the DFP contents to a file
- Parameters:
- fname: str/pathlib.Path
Path to write/save the DFP on disk
See also