One or more non-transitory computer-readable media storing processor-executable instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
- converting a first neural network into a second neural network by replacing at least one original neural network operation with at least one replacement neural network operation, wherein:
- the first neural network is untrained and associated with first hardware,
- the second neural network is untrained and associated with second hardware having distinct computing performance from the first hardware,
- the second hardware does not support the at least one original neural network operation,
- the second hardware supports the at least one replacement neural network operation, and
- the second neural network is configured to run on an autonomous vehicle;
- executing the first neural network using a set of weights associated with the first neural network, wherein executing the first neural network comprises executing a first intermediate layer of the first neural network, wherein:
- the first intermediate layer of the first neural network outputs a first output, wherein the first output is based at least in part on the first intermediate layer performing the at least one original neural network operation;
- executing the second neural network using the set of weights, wherein executing the second neural network comprises executing a second intermediate layer of the second neural network, wherein:
- the second intermediate layer is associated with the first intermediate layer of the first neural network, and
- the second intermediate layer of the second neural network outputs a second output, wherein the second output is based at least in part on the second intermediate layer performing the at least one replacement neural network operation;
- replacing the at least one replacement neural network operation of the second intermediate layer with a second replacement operation supported by the second hardware, wherein:
- replacing the at least one replacement neural network operation is based at least in part on determining that a first deviation between the first output and the second output exceeds a first threshold value, and
- replacing the at least one replacement neural network operation reduces the first deviation below the first threshold value;
- converting a first portion of the first neural network into a first updated portion of the second neural network, based at least in part on the first deviation being below the first threshold value, wherein:
- the first portion comprises a third intermediate layer of the first neural network, and
- converting the first portion comprises replacing at least one operation in the third intermediate layer of the first neural network with the second replacement operation from the second intermediate layer of the second neural network;
- determining the third intermediate layer of the first neural network, based at least in part on the first deviation being below the first threshold value;
- determining a third output of the third intermediate layer of the first neural network;
- determining a fourth output of a fourth intermediate layer of the second neural network, wherein the fourth intermediate layer is associated with the third intermediate layer of the first neural network and performs a third replacement operation;
- replacing the third replacement operation of the fourth intermediate layer with a fourth replacement operation supported by the second hardware, wherein:
- replacing the third replacement operation is based at least in part on determining that a second deviation between the third output and the fourth output exceeds a second threshold value, and
- replacing the third replacement operation reduces the second deviation below the second threshold value;
- and
- performing an action based at least in part on the second deviation being below the second threshold value, wherein the action comprises training the second neural network.