Skip to content

Commit

Permalink
remove more casting errors that fail at compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Sep 30, 2024
1 parent 1d80600 commit c35f367
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ void main(String[] args) throws LoadEngineException, Exception {
// Create the input tensor with the nameand axes given by the rdf.yaml file
// and add it to the list of input tensors
Tensor<FloatType> inpTensor = Tensor.build("input0", "bcyx", img1);
List<Tensor<T>> inputs = new ArrayList<Tensor<T>>();
inputs.add((Tensor<T>) inpTensor);
List<Tensor<FloatType>> inputs = new ArrayList<Tensor<FloatType>>();
inputs.add(inpTensor);

// Create the output tensors defined in the rdf.yaml file with their corresponding
// name and axes and add them to the output list of tensors.
Expand All @@ -126,8 +126,8 @@ void main(String[] args) throws LoadEngineException, Exception {
new FloatType());*/
final Img< FloatType > img2 = imgFactory.create( 1, 2, 512, 512 );
Tensor<FloatType> outTensor = Tensor.build("output0", "bcyx", img2);
List<Tensor<R>> outputs = new ArrayList<Tensor<R>>();
outputs.add((Tensor<R>) outTensor);
List<Tensor<FloatType>> outputs = new ArrayList<Tensor<FloatType>>();
outputs.add(outTensor);

// Run the model on the input tensors. THe output tensors
// will be rewritten with the result of the execution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ void loadAndRunPt2(String modelFolder, String modelSource) throws LoadEngineExce
// Create the input tensor with the nameand axes given by the rdf.yaml file
// and add it to the list of input tensors
Tensor<FloatType> inpTensor = Tensor.build("input0", "bcyx", img1);
List<Tensor<T>> inputs = new ArrayList<Tensor<T>>();
inputs.add((Tensor<T>) inpTensor);
List<Tensor<FloatType>> inputs = new ArrayList<Tensor<FloatType>>();
inputs.add(inpTensor);

// Create the output tensors defined in the rdf.yaml file with their corresponding
// name and axes and add them to the output list of tensors.
Expand All @@ -140,8 +140,8 @@ void loadAndRunPt2(String modelFolder, String modelSource) throws LoadEngineExce
new FloatType());*/
final Img< FloatType > img2 = imgFactory.create( 1, 2, 512, 512 );
Tensor<FloatType> outTensor = Tensor.build("output0", "bcyx", img2);
List<Tensor<R>> outputs = new ArrayList<Tensor<R>>();
outputs.add((Tensor<R>) outTensor);
List<Tensor<FloatType>> outputs = new ArrayList<Tensor<FloatType>>();
outputs.add(outTensor);

// Run the model on the input tensors. THe output tensors
// will be rewritten with the result of the execution
Expand Down Expand Up @@ -197,8 +197,8 @@ void loadAndRunPt1(String modelFolder, String modelSource) throws LoadEngineExce
// Create the input tensor with the nameand axes given by the rdf.yaml file
// and add it to the list of input tensors
Tensor<FloatType> inpTensor = Tensor.build("input0", "bcyx", img1);
List<Tensor<T>> inputs = new ArrayList<Tensor<T>>();
inputs.add((Tensor<T>) inpTensor);
List<Tensor<FloatType>> inputs = new ArrayList<Tensor<FloatType>>();
inputs.add(inpTensor);

// Create the output tensors defined in the rdf.yaml file with their corresponding
// name and axes and add them to the output list of tensors.
Expand All @@ -211,8 +211,8 @@ void loadAndRunPt1(String modelFolder, String modelSource) throws LoadEngineExce
new FloatType());*/
final Img< FloatType > img2 = imgFactory.create( 1, 2, 512, 512 );
Tensor<FloatType> outTensor = Tensor.build("output0", "bcyx", img2);
List<Tensor<R>> outputs = new ArrayList<Tensor<R>>();
outputs.add((Tensor<R>) outTensor);
List<Tensor<FloatType>> outputs = new ArrayList<Tensor<FloatType>>();
outputs.add(outTensor);

// Run the model on the input tensors. THe output tensors
// will be rewritten with the result of the execution
Expand Down

0 comments on commit c35f367

Please sign in to comment.