Skip to content

Commit

Permalink
correct small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Dec 14, 2023
1 parent b0ea6c6 commit 09333d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private PytorchJavaCPPInterface(boolean doInterprocessing)
public static < T extends RealType< T > & NativeType< T > > void main(String[] args) throws LoadModelException, RunModelException {
if (args.length == 0) {

String modelFolder = "/home/carlos/git/deep-icy/models/Neuron Segmentation in EM (Membrane Prediction)_30102023_192607";
String modelFolder = "/home/carlos/git/deep-icy/models/Neuron Segmentation in EM (Membrane Prediction)_07122023_193930";
String modelSourc = modelFolder + "/weights-torchscript.pt";
PytorchJavaCPPInterface pi = new PytorchJavaCPPInterface();
pi.loadModel(modelFolder, modelSourc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public static < T extends RealType< T > & NativeType< T > > org.bytedeco.pytorch
return buildFromTensorFloat(Cast.unchecked(tensor));
} else if (Util.getTypeFromInterval(tensor) instanceof DoubleType) {
return buildFromTensorDouble(Cast.unchecked(tensor));
} else if (Util.getTypeFromInterval(tensor) instanceof FloatType) {
return buildFromTensorFloat(Cast.unchecked(tensor));
} else {
throw new IllegalArgumentException("Unsupported tensor type: " + Util.getTypeFromInterval(tensor).getClass().toString());
}
Expand Down

0 comments on commit 09333d0

Please sign in to comment.