Bladeren bron

Rename ./src to ./source

Lutz Roeder 5 jaren geleden
bovenliggende
commit
938d451504
100 gewijzigde bestanden met toevoegingen van 36 en 36 verwijderingen
  1. 1 1
      .vscode/launch.json
  2. 1 1
      Makefile
  3. 1 1
      electron-builder.yml
  4. 1 1
      package.json
  5. 1 1
      setup.py
  6. 0 0
      source/__init__.py
  7. 0 0
      source/__version__.py
  8. 0 0
      source/app.js
  9. 0 0
      source/armnn-metadata.json
  10. 0 0
      source/armnn-schema.js
  11. 0 0
      source/armnn.js
  12. 0 0
      source/barracuda.js
  13. 0 0
      source/base.js
  14. 0 0
      source/bigdl-metadata.json
  15. 0 0
      source/bigdl-proto.js
  16. 0 0
      source/bigdl.js
  17. 0 0
      source/bson.js
  18. 0 0
      source/caffe-metadata.json
  19. 0 0
      source/caffe-proto.js
  20. 0 0
      source/caffe.js
  21. 0 0
      source/caffe2-metadata.json
  22. 0 0
      source/caffe2-proto.js
  23. 0 0
      source/caffe2.js
  24. 0 0
      source/cntk-metadata.json
  25. 0 0
      source/cntk-proto.js
  26. 0 0
      source/cntk.js
  27. 0 0
      source/coreml-metadata.json
  28. 0 0
      source/coreml-proto.js
  29. 0 0
      source/coreml.js
  30. 0 0
      source/darknet-metadata.json
  31. 0 0
      source/darknet.js
  32. 0 0
      source/dl4j-metadata.json
  33. 0 0
      source/dl4j.js
  34. 0 0
      source/electron.html
  35. 0 0
      source/electron.js
  36. 0 0
      source/favicon.ico
  37. 0 0
      source/flatbuffers.js
  38. 0 0
      source/flux-metadata.json
  39. 0 0
      source/flux.js
  40. 0 0
      source/gzip.js
  41. 0 0
      source/hdf5.js
  42. 0 0
      source/icon.png
  43. 0 0
      source/index.html
  44. 0 0
      source/index.js
  45. 0 0
      source/keras-metadata.json
  46. 0 0
      source/keras.js
  47. 0 0
      source/mediapipe.js
  48. 0 0
      source/mlnet-metadata.json
  49. 0 0
      source/mlnet.js
  50. 0 0
      source/mnn-metadata.json
  51. 0 0
      source/mnn-schema.js
  52. 0 0
      source/mnn.js
  53. 0 0
      source/mxnet-metadata.json
  54. 0 0
      source/mxnet.js
  55. 0 0
      source/ncnn-metadata.json
  56. 0 0
      source/ncnn.js
  57. 0 0
      source/npz.js
  58. 0 0
      source/numpy.js
  59. 0 0
      source/onnx-metadata.json
  60. 0 0
      source/onnx-proto.js
  61. 0 0
      source/onnx.js
  62. 0 0
      source/openvino-metadata.json
  63. 0 0
      source/openvino.js
  64. 0 0
      source/paddle-metadata.json
  65. 0 0
      source/paddle-proto.js
  66. 0 0
      source/paddle.js
  67. 0 0
      source/pickle.js
  68. 0 0
      source/protobuf.js
  69. 0 0
      source/python.js
  70. 0 0
      source/pytorch-metadata.json
  71. 1 1
      source/pytorch.js
  72. 0 0
      source/server.py
  73. 0 0
      source/sklearn-metadata.json
  74. 0 0
      source/sklearn.js
  75. 0 0
      source/tar.js
  76. 0 0
      source/tengine-metadata.json
  77. 1 1
      source/tengine.js
  78. 0 0
      source/tf-metadata.json
  79. 0 0
      source/tf-proto.js
  80. 0 0
      source/tf.js
  81. 0 0
      source/tflite-metadata.json
  82. 0 0
      source/tflite-schema.js
  83. 0 0
      source/tflite.js
  84. 0 0
      source/tnn-metadata.json
  85. 0 0
      source/tnn.js
  86. 0 0
      source/torch-metadata.json
  87. 0 0
      source/torch.js
  88. 0 0
      source/uff-metadata.json
  89. 0 0
      source/uff-proto.js
  90. 0 0
      source/uff.js
  91. 0 0
      source/view-grapher.css
  92. 0 0
      source/view-grapher.js
  93. 0 0
      source/view-sidebar.css
  94. 0 0
      source/view-sidebar.js
  95. 0 0
      source/view.js
  96. 0 0
      source/zip.js
  97. 10 10
      test/models.js
  98. 6 6
      tools/armnn
  99. 6 6
      tools/bigdl
  100. 7 7
      tools/caffe

+ 1 - 1
.vscode/launch.json

@@ -5,7 +5,7 @@
             "name": "Launch Program",
             "type": "node",
             "request": "launch",
-            "program": "${workspaceFolder}/src/app.js",
+            "program": "${workspaceFolder}/source/app.js",
             "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
             "windows": {
                 "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"

+ 1 - 1
Makefile

@@ -41,7 +41,7 @@ build_electron: install
 	npx electron-builder --linux snap --publish never
 
 lint: install
-	npx eslint src/*.js test/*.js setup/*.js tools/*.js
+	npx eslint source/*.js test/*.js setup/*.js tools/*.js
 
 test: install
 	node ./test/models.js

+ 1 - 1
electron-builder.yml

@@ -1,7 +1,7 @@
 appId: com.lutzroeder.netron
 productName: Netron
 files:
-  - 'src/**/*'
+  - 'source/**/*'
 directories:
   buildResources: ./setup
 fileAssociations:

+ 1 - 1
package.json

@@ -10,7 +10,7 @@
     "description": "Visualizer for neural network, deep learning and machine learning models",
     "license": "MIT",
     "repository": "lutzroeder/netron",
-    "main": "src/app.js",
+    "main": "source/app.js",
     "scripts": {
         "postinstall": "electron-builder install-app-deps",
         "start": "[ -d node_modules ] || npm install && npx electron .",

+ 1 - 1
setup.py

@@ -82,7 +82,7 @@ setuptools.setup(
         'build_py': build_py
     },
     package_dir={
-        'netron': 'src'
+        'netron': 'source'
     },
     packages=[
         'netron'

+ 0 - 0
src/__init__.py → source/__init__.py


+ 0 - 0
src/__version__.py → source/__version__.py


+ 0 - 0
src/app.js → source/app.js


+ 0 - 0
src/armnn-metadata.json → source/armnn-metadata.json


+ 0 - 0
src/armnn-schema.js → source/armnn-schema.js


+ 0 - 0
src/armnn.js → source/armnn.js


+ 0 - 0
src/barracuda.js → source/barracuda.js


+ 0 - 0
src/base.js → source/base.js


+ 0 - 0
src/bigdl-metadata.json → source/bigdl-metadata.json


+ 0 - 0
src/bigdl-proto.js → source/bigdl-proto.js


+ 0 - 0
src/bigdl.js → source/bigdl.js


+ 0 - 0
src/bson.js → source/bson.js


+ 0 - 0
src/caffe-metadata.json → source/caffe-metadata.json


+ 0 - 0
src/caffe-proto.js → source/caffe-proto.js


+ 0 - 0
src/caffe.js → source/caffe.js


+ 0 - 0
src/caffe2-metadata.json → source/caffe2-metadata.json


+ 0 - 0
src/caffe2-proto.js → source/caffe2-proto.js


+ 0 - 0
src/caffe2.js → source/caffe2.js


+ 0 - 0
src/cntk-metadata.json → source/cntk-metadata.json


+ 0 - 0
src/cntk-proto.js → source/cntk-proto.js


+ 0 - 0
src/cntk.js → source/cntk.js


+ 0 - 0
src/coreml-metadata.json → source/coreml-metadata.json


+ 0 - 0
src/coreml-proto.js → source/coreml-proto.js


+ 0 - 0
src/coreml.js → source/coreml.js


+ 0 - 0
src/darknet-metadata.json → source/darknet-metadata.json


+ 0 - 0
src/darknet.js → source/darknet.js


+ 0 - 0
src/dl4j-metadata.json → source/dl4j-metadata.json


+ 0 - 0
src/dl4j.js → source/dl4j.js


+ 0 - 0
src/electron.html → source/electron.html


+ 0 - 0
src/electron.js → source/electron.js


+ 0 - 0
src/favicon.ico → source/favicon.ico


+ 0 - 0
src/flatbuffers.js → source/flatbuffers.js


+ 0 - 0
src/flux-metadata.json → source/flux-metadata.json


+ 0 - 0
src/flux.js → source/flux.js


+ 0 - 0
src/gzip.js → source/gzip.js


+ 0 - 0
src/hdf5.js → source/hdf5.js


+ 0 - 0
src/icon.png → source/icon.png


+ 0 - 0
src/index.html → source/index.html


+ 0 - 0
src/index.js → source/index.js


+ 0 - 0
src/keras-metadata.json → source/keras-metadata.json


+ 0 - 0
src/keras.js → source/keras.js


+ 0 - 0
src/mediapipe.js → source/mediapipe.js


+ 0 - 0
src/mlnet-metadata.json → source/mlnet-metadata.json


+ 0 - 0
src/mlnet.js → source/mlnet.js


+ 0 - 0
src/mnn-metadata.json → source/mnn-metadata.json


+ 0 - 0
src/mnn-schema.js → source/mnn-schema.js


+ 0 - 0
src/mnn.js → source/mnn.js


+ 0 - 0
src/mxnet-metadata.json → source/mxnet-metadata.json


+ 0 - 0
src/mxnet.js → source/mxnet.js


+ 0 - 0
src/ncnn-metadata.json → source/ncnn-metadata.json


+ 0 - 0
src/ncnn.js → source/ncnn.js


+ 0 - 0
src/npz.js → source/npz.js


+ 0 - 0
src/numpy.js → source/numpy.js


+ 0 - 0
src/onnx-metadata.json → source/onnx-metadata.json


+ 0 - 0
src/onnx-proto.js → source/onnx-proto.js


+ 0 - 0
src/onnx.js → source/onnx.js


+ 0 - 0
src/openvino-metadata.json → source/openvino-metadata.json


+ 0 - 0
src/openvino.js → source/openvino.js


+ 0 - 0
src/paddle-metadata.json → source/paddle-metadata.json


+ 0 - 0
src/paddle-proto.js → source/paddle-proto.js


+ 0 - 0
src/paddle.js → source/paddle.js


+ 0 - 0
src/pickle.js → source/pickle.js


+ 0 - 0
src/protobuf.js → source/protobuf.js


+ 0 - 0
src/python.js → source/python.js


+ 0 - 0
src/pytorch-metadata.json → source/pytorch-metadata.json


+ 1 - 1
src/pytorch.js → source/pytorch.js

@@ -2592,7 +2592,7 @@ pytorch.Container.Zip = class {
                 this._format = this._entry('attributes.pkl') ? 'TorchScript v1.1' : 'TorchScript v1.0';
             }
             else if (this._entry('data.pkl')) {
-                // kProducedFileFormatVersion in ./third_party/src/pytorch/caffe2/serialize/inline_container.h
+                // kProducedFileFormatVersion in https://github.com/pytorch/pytorch/blob/master/caffe2/serialize/inline_container.h
                 const versionEntry = this._entry('version');
                 const versionNumber = versionEntry ? this._utf8Decoder.decode(versionEntry.data).split('\n').shift() : '';
                 const versionTable = { '1': 'v1.3', '2': 'v1.4', '3': 'v1.6', '4': 'v1.7' };

+ 0 - 0
src/server.py → source/server.py


+ 0 - 0
src/sklearn-metadata.json → source/sklearn-metadata.json


+ 0 - 0
src/sklearn.js → source/sklearn.js


+ 0 - 0
src/tar.js → source/tar.js


+ 0 - 0
src/tengine-metadata.json → source/tengine-metadata.json


+ 1 - 1
src/tengine.js → source/tengine.js

@@ -517,7 +517,7 @@ tengine.ModelFileReader = class {
 
     constructor(buffer) {
 
-        // ./third_party/src/tengine/serializer/include/tengine/v2/tm2_format.h
+        // https://github.com/OAID/Tengine/blob/tengine-lite/src/serializer/tm/tm2_format.h
         // https://github.com/OAID/Tengine/wiki/The-format-of-tmfile
 
         const types = new Map();

+ 0 - 0
src/tf-metadata.json → source/tf-metadata.json


+ 0 - 0
src/tf-proto.js → source/tf-proto.js


+ 0 - 0
src/tf.js → source/tf.js


+ 0 - 0
src/tflite-metadata.json → source/tflite-metadata.json


+ 0 - 0
src/tflite-schema.js → source/tflite-schema.js


+ 0 - 0
src/tflite.js → source/tflite.js


+ 0 - 0
src/tnn-metadata.json → source/tnn-metadata.json


+ 0 - 0
src/tnn.js → source/tnn.js


+ 0 - 0
src/torch-metadata.json → source/torch-metadata.json


+ 0 - 0
src/torch.js → source/torch.js


+ 0 - 0
src/uff-metadata.json → source/uff-metadata.json


+ 0 - 0
src/uff-proto.js → source/uff-proto.js


+ 0 - 0
src/uff.js → source/uff.js


+ 0 - 0
src/view-grapher.css → source/view-grapher.css


+ 0 - 0
src/view-grapher.js → source/view-grapher.js


+ 0 - 0
src/view-sidebar.css → source/view-sidebar.css


+ 0 - 0
src/view-sidebar.js → source/view-sidebar.js


+ 0 - 0
src/view.js → source/view.js


+ 0 - 0
src/zip.js → source/zip.js


+ 10 - 10
test/models.js

@@ -10,14 +10,14 @@ const child_process = require('child_process');
 const http = require('http');
 const https = require('https');
 const url = require('url');
-const protobuf = require('../src/protobuf');
-const flatbuffers = require('../src/flatbuffers');
-const sidebar = require('../src/view-sidebar.js');
-const view = require('../src/view.js');
-const zip = require('../src/zip');
-const gzip = require('../src/gzip');
-const tar = require('../src/tar');
-const base = require('../src/base');
+const protobuf = require('../source/protobuf');
+const flatbuffers = require('../source/flatbuffers');
+const sidebar = require('../source/view-sidebar.js');
+const view = require('../source/view.js');
+const zip = require('../source/zip');
+const gzip = require('../source/gzip');
+const tar = require('../source/tar');
+const base = require('../source/base');
 const xmldom = require('xmldom');
 
 global.Int64 = base.Int64;
@@ -92,7 +92,7 @@ class TestHost {
 
     require(id) {
         try {
-            const file = path.join(path.join(__dirname, '../src'), id + '.js');
+            const file = path.join(path.join(__dirname, '../source'), id + '.js');
             return Promise.resolve(require(file));
         }
         catch (error) {
@@ -101,7 +101,7 @@ class TestHost {
     }
 
     request(base, file, encoding) {
-        const pathname = path.join(base || path.join(__dirname, '../src'), file);
+        const pathname = path.join(base || path.join(__dirname, '../source'), file);
         if (!fs.existsSync(pathname)) {
             return Promise.reject(new Error("File not found '" + file + "'."));
         }

+ 6 - 6
tools/armnn

@@ -9,23 +9,23 @@ bold() {
 
 clean() {
     bold "armnn clean"
-    rm -rf ./third_party/src/armnn
+    rm -rf ./third_party/source/armnn
 }
 
 sync() {
     bold "armnn sync"
-    [ -d "./third_party/src/armnn" ] || git clone --quiet --depth=1 --branch master https://github.com/ARM-software/armnn.git "./third_party/src/armnn"
-    pushd "./third_party/src/armnn" > /dev/null
+    [ -d "./third_party/source/armnn" ] || git clone --quiet --depth=1 --branch master https://github.com/ARM-software/armnn.git "./third_party/source/armnn"
+    pushd "./third_party/source/armnn" > /dev/null
     git pull --quiet --prune
     popd > /dev/null
 }
 
 schema() {
     bold "armnn schema"
-    [[ $(grep -U $'\x0D' ./src/armnn-schema.js) ]] && crlf=1
-    node ./tools/flatc.js --text --root armnn --out ./src/armnn-schema.js ./third_party/src/armnn/src/armnnSerializer/ArmnnSchema.fbs
+    [[ $(grep -U $'\x0D' ./source/armnn-schema.js) ]] && crlf=1
+    node ./tools/flatc.js --text --root armnn --out ./source/armnn-schema.js ./third_party/source/armnn/src/armnnSerializer/ArmnnSchema.fbs
     if [[ -n ${crlf} ]]; then
-        unix2dos --quiet --newfile ./src/armnn-schema.js ./src/armnn-schema.js
+        unix2dos --quiet --newfile ./source/armnn-schema.js ./source/armnn-schema.js
     fi
 }
 

+ 6 - 6
tools/bigdl

@@ -9,21 +9,21 @@ bold() {
 
 clean() {
     bold "bigdl clean"
-    rm -rf ./third_party/src/bigdl
+    rm -rf ./third_party/source/bigdl
 }
 
 sync() {
     bold "bigdl sync"
-    mkdir -p "./third_party/src/bigdl/spark/dl/src/main/resources/serialization"
-    curl --silent --location --output "./third_party/src/bigdl/spark/dl/src/main/resources/serialization/bigdl.proto" "https://github.com/intel-analytics/BigDL/blob/master/spark/dl/src/main/resources/serialization/bigdl.proto?raw=true"
+    mkdir -p "./third_party/source/bigdl/spark/dl/src/main/resources/serialization"
+    curl --silent --location --output "./third_party/source/bigdl/spark/dl/src/main/resources/serialization/bigdl.proto" "https://github.com/intel-analytics/BigDL/blob/master/spark/dl/src/main/resources/serialization/bigdl.proto?raw=true"
 }
 
 schema() {
     bold "bigdl schema"
-    [[ $(grep -U $'\x0D' ./src/bigdl-proto.js) ]] && crlf=1
-    node ./tools/protoc.js --root bigdl --out ./src/bigdl-proto.js ./third_party/src/bigdl/spark/dl/src/main/resources/serialization/bigdl.proto
+    [[ $(grep -U $'\x0D' ./source/bigdl-proto.js) ]] && crlf=1
+    node ./tools/protoc.js --root bigdl --out ./source/bigdl-proto.js ./third_party/source/bigdl/spark/dl/src/main/resources/serialization/bigdl.proto
     if [[ -n ${crlf} ]]; then
-        unix2dos --quiet --newfile ./src/bigdl-proto.js ./src/bigdl-proto.js
+        unix2dos --quiet --newfile ./source/bigdl-proto.js ./source/bigdl-proto.js
     fi
 }
 

+ 7 - 7
tools/caffe

@@ -10,26 +10,26 @@ bold() {
 
 clean() {
     bold "caffe clean"
-    rm -rf "./third_party/src/caffe"
+    rm -rf "./third_party/source/caffe"
 }
 
 sync() {
     bold "caffe sync"
-    [ -d "./third_party/src/caffe" ] || git clone --quiet https://github.com/BVLC/caffe.git "./third_party/src/caffe"
-    pushd "./third_party/src/caffe" > /dev/null
+    [ -d "./third_party/source/caffe" ] || git clone --quiet https://github.com/BVLC/caffe.git "./third_party/source/caffe"
+    pushd "./third_party/source/caffe" > /dev/null
     git pull --quiet --prune
     popd > /dev/null
 }
 
 schema() {
     bold "caffe schema"
-    [[ $(grep -U $'\x0D' ./src/caffe-proto.js) ]] && crlf=1
+    [[ $(grep -U $'\x0D' ./source/caffe-proto.js) ]] && crlf=1
     temp=$(mktemp -d)
-    sed 's/required float min = 1;/optional float min = 1;/g;s/required float max = 2;/optional float max = 2;/g' < ./third_party/src/caffe/src/caffe/proto/caffe.proto > ${temp}/caffe.proto
-    node ./tools/protoc.js --text --root caffe --out ./src/caffe-proto.js ${temp}/caffe.proto
+    sed 's/required float min = 1;/optional float min = 1;/g;s/required float max = 2;/optional float max = 2;/g' < ./third_party/source/caffe/src/caffe/proto/caffe.proto > ${temp}/caffe.proto
+    node ./tools/protoc.js --text --root caffe --out ./source/caffe-proto.js ${temp}/caffe.proto
     rm -rf ${temp}
     if [[ -n ${crlf} ]]; then
-        unix2dos --quiet --newfile ./src/caffe-proto.js ./src/caffe-proto.js
+        unix2dos --quiet --newfile ./source/caffe-proto.js ./source/caffe-proto.js
     fi
 }
 

Some files were not shown because too many files changed in this diff