How to initialize weights to network created from scratch in TensorRT?

In this discussion about Creating A Network Definition From Scratch Using The C++ API, the network is defined using TensorRT APIs. But how to initialize weights to the network is not described.

Please refer to this sample:

Thanks