Skip to content

Commit 7b0bfce

Browse files
committed
Cleanup network paths (#974)
* rename, remove another network * use new network location * new network location * update to latest networks * bugfix, new path
1 parent 3b0a54b commit 7b0bfce

File tree

9 files changed

+7
-7
lines changed

9 files changed

+7
-7
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
path = validation/advanced-tests/data
66
url = https://code.jlab.org/hallb/clas12/coatjava/advanced-tests
77
[submodule "etc/nnet"]
8-
path = etc/nnet
8+
path = etc/data/nnet
99
url = https://code.jlab.org/hallb/clas12/coatjava/networks

build-coatjava.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ download () {
110110
cd $src_dir > /dev/null
111111
git lfs install
112112
git submodule update --init etc/data/magfield
113-
git submodule update --init etc/nnet
113+
git submodule update --init etc/data/nnet
114114
if $downloadData; then git submodule update --init validation/advanced-tests/data; fi
115115
cd - > /dev/null
116116
else

etc/data/nnet

Submodule nnet added at 26318bd

etc/ejml/ejmlclas12.network

-669 KB
Binary file not shown.

etc/nnet

Lines changed: 0 additions & 1 deletion
This file was deleted.

reconstruction/ai/src/main/java/org/jlab/service/ai/DCDenoiseEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public boolean init() {
6565
try {
6666
criteria = Criteria.builder()
6767
.setTypes(float[][].class, float[][].class)
68-
.optModelPath(Paths.get(ClasUtilsFile.getResourceDir("CLAS12DIR","etc/nnet/dn/cnn_autoenc_sector1_nBlocks2.pt")))
68+
.optModelPath(Paths.get(ClasUtilsFile.getResourceDir("CLAS12DIR","etc/data/nnet/dn/cnn_autoenc_sector1_nBlocks2.pt")))
6969
.optEngine("PyTorch")
7070
.optTranslator(DCDenoiseEngine.getTranslator())
7171
.optProgress(new ProgressBar())

reconstruction/alert/src/main/java/org/jlab/rec/ahdc/AI/Model.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public NDList processInput(TranslatorContext translatorContext, float[] floats)
4343
System.setProperty("ai.djl.pytorch.num_threads", "1");
4444
System.setProperty("ai.djl.pytorch.graph_optimizer", "false");
4545

46-
String path = CLASResources.getResourcePath("etc/nnet/ALERT/model_AHDC/");
46+
String path = CLASResources.getResourcePath("etc/data/nnet/ALERT/model_AHDC/");
4747
Criteria<float[], Float> my_model = Criteria.builder().setTypes(float[].class, Float.class)
4848
.optModelPath(Paths.get(path))
4949
.optEngine("PyTorch")

reconstruction/mltn/src/main/java/org/jlab/service/mltn/MLTDEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public boolean init() {
4545
String runNumber = Optional.ofNullable(this.getEngineConfigString("run")).orElse("5038");
4646
networkRun = Integer.parseInt(runNumber);
4747

48-
String path = CLASResources.getResourcePath("etc/ejml/ejmlclas12.network");
48+
String path = CLASResources.getResourcePath("etc/data/nnet/ejml/ejmlclas12.network");
4949
if(this.getEngineConfigString("network")!=null)
5050
path = this.getEngineConfigString("network");
5151
System.out.println("[neural-network] info : Loading neural network from " + path);

reconstruction/mltn/src/main/java/org/jlab/service/mltn/MLTNEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public MLTNEngine(){
2929
@Override
3030
public boolean init() {
3131
classifier.setEnvDirectory("CLAS12DIR");
32-
classifier.setEnvPath("etc/nnet/neuroph");
32+
classifier.setEnvPath("etc/data/nnet/neuroph");
3333
classifier.load("trackClassifier.nnet", "trackFixer.nnet");
3434
System.out.println("Loading neural network files done...");
3535
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.

0 commit comments

Comments
 (0)