PaddlePaddle
Others
2019-09-06 07:18:55
views: null
PaddlePaddle
NVIDA driver installation
CentOS
vim /lib/modprobe.d/dist-blacklist.conf
- Add
blacklist nouveau
the screen comes with CentOS nouveau
- Rebuild initramfs image
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut /boot/initramfs-$(uname -r).img $(uname -r)
reboot
lsmod | grep nouveau
To see if the success is disabled
chmod +x NVIDIA-Linux-x86_64-***.run && ./NVIDA-Linux-x86_64-***.run
Run the program to install the driver
API
Program
- Meaning: there are default fluid
default_startup_program()
and default_main_program()
two program, if the network is not set up, then are empty, if the built network, default_startup_program()
need only be performed once for initialization parameters, default_main_program()
each mini-batch perform before for propagation; Program It can be understood as a calculation map, and adding nodes to give the program operation, it is necessary with fluid.program_guard(program1, program2)
to build the network, without this statement, in the default default_*
in which the parameter program1
is main_program
, each mini-batch perform, program2
as startup_program
only need be done only once operation; developers only need to focus program1
parameters can, program2
parameter we simply initialization parameters
- Create a way
program = fluid.Program()
main_program = fluid.default_main_program() # 默认
startup_program = fluid.default_startup_program() # 默认
Model visualization
ONNX
- paddlepaddle visualization diagram itself can not, the network structure needs to be converted to .pb file format onnx of the job, use the command-line tool to convert paddle2onnx
- operating
- Installation depends
- paddlepaddle
- onnx
- onnxruntime
- paddle2onnx
- Conversion command
paddle2onnx --fluid_model ./infer_model/ --onnx_model model.pb
- About infer_model, this is a directory, use the network model paddlepaddle in
fluid.save_inference_model(dirname, [input], [output], exe)
to save the models and parameters dirname, where __model__ as a model for the rest of the file parameters
- Netron download software for visualization file input .pb
- The supplement to the first point, paddlepaddle can not be visualized because protobuf wrong version, use the command to install
pip install protobuf==3.6.1
Origin www.cnblogs.com/megachen/p/11470187.html