PaddlePaddle

PaddlePaddle

NVIDA driver installation

CentOS

  1. vim /lib/modprobe.d/dist-blacklist.conf
  2. Add blacklist nouveauthe screen comes with CentOS nouveau
  3. Rebuild initramfs image
    1. mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
    2. dracut /boot/initramfs-$(uname -r).img $(uname -r)
  4. reboot
  5. lsmod | grep nouveau To see if the success is disabled
  6. chmod +x NVIDIA-Linux-x86_64-***.run && ./NVIDA-Linux-x86_64-***.run Run the program to install the driver

API

Program

  1. 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 program1is main_program, each mini-batch perform, program2as startup_programonly need be done only once operation; developers only need to focus program1parameters can, program2parameter we simply initialization parameters
  2. Create a way
    1. program = fluid.Program()
    2. main_program = fluid.default_main_program() # 默认
    3. startup_program = fluid.default_startup_program() # 默认

Model visualization

ONNX

  1. 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
  2. operating
    1. Installation depends
      1. paddlepaddle
      2. onnx
      3. onnxruntime
      4. paddle2onnx
    2. Conversion command paddle2onnx --fluid_model ./infer_model/ --onnx_model model.pb
      1. 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
    3. Netron download software for visualization file input .pb
  3. 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

Guess you like

Origin www.cnblogs.com/megachen/p/11470187.html