Setting Up Netron Server

Introduction

Netron is a useful tool for neural network visualization. Sometimes the neural network files are on the server and we don’t want to transfer the files, some of which are large, to local computer and view locally. Fortunately, Netron has a Python server version which allows the user to set up a Netron host on the remote server and the user will just have to connect to the server and view the neural network remotely.

In this blog post, I would like to quickly talk about how to set up Netron server.

Netron Sever Setup

SSH to Remote Server

SSH to the remote server with port binding using the following command.

8080 is the default port used by Netron server.

Install Netron Sever

Netron server is only available for the Python. Install Netron via pip instead of snap using the following command.

In this case, Netron was not accessible from PATH after installation. We will have to update PATH manually by adding export PATH="$HOME/.local/bin:$PATH" to ~/.bash_profile. Then source the updated file by running the following command.

Run Netron Server

Start a Netron server for a certain neural network ONNX file, such as ResNet18, from the server using the following command.

View Neural Network

Open a browser from the local computer and access the neural network via URL 127.0.0.1:8080.

Lei Mao

06-07-2022

06-07-2022