Skip to content

Commit

Permalink
Merge pull request #561 from Deep-MI/mac
Browse files Browse the repository at this point in the history
fix things for Mac and MPS
  • Loading branch information
m-reuter authored Aug 26, 2024
2 parents 3a31357 + a8bc861 commit b812c37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion HypVINN/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def eval(self, val_loader: DataLoader, pred_prob: torch.Tensor, out_scale: float

images = batch["image"].to(self.device)
scale_factors = batch["scale_factor"].to(self.device)
weight_factors = batch["weight_factor"].to(self.device)
weight_factors = batch["weight_factor"].to(self.device, dtype=torch.float32)

pred = self.model(images, scale_factors, weight_factors, out_scale)

Expand Down
8 changes: 4 additions & 4 deletions recon_surf/recon-surf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ echo "Log file for Conform test" > "$CONFORM_LF"

# check for input conformance
cmd="$python $FASTSURFER_HOME/FastSurferCNN/data_loader/conform.py -i $t1 --check_only --vox_size min --verbose"
RunIt "$cmd" "$LF" |& tee -a "$CONFORM_LF"
RunIt "$cmd" "$LF" 2>&1 | tee -a "$CONFORM_LF"

# look into the CONFORM_LF to find the voxel sizes, the second conform.py call will check the legality of vox_size
vox_size=$(grep -E " - Voxel Size " "$CONFORM_LF" | cut -d' ' -f5 | cut -d'x' -f1)
Expand Down Expand Up @@ -835,7 +835,7 @@ if [ "$DoParallel" == 1 ] ; then
echo ""
echo " RUNNING HEMIs in PARALLEL !!! "
echo ""
} |& tee -a "$LF"
} | tee -a "$LF"
RunBatchJobs "$LF" "${CMDFS[@]}"
fi

Expand Down Expand Up @@ -1088,7 +1088,7 @@ tRunHours=$(printf %6.3f "$tRunHours")
echo "Started at $StartTime"
echo "Ended at $EndTime"
echo "#@#%# recon-surf-run-time-hours $tRunHours"
} |& tee -a "$LF"
} | tee -a "$LF"

# Create the Done File
{
Expand All @@ -1113,7 +1113,7 @@ tRunHours=$(printf %6.3f "$tRunHours")
echo "CMDPATH $0"
echo "CMDARGS ${inputargs[*]}"
} > "$DoneFile"
echo "recon-surf.sh $subject finished without error at $(date)" |& tee -a "$LF"
echo "recon-surf.sh $subject finished without error at $(date)" | tee -a "$LF"

cmd="$python ${binpath}utils/extract_recon_surf_time_info.py -i $LF -o $SUBJECTS_DIR/$subject/scripts/recon-surf_times.yaml"
RunIt "$cmd" "/dev/null"

0 comments on commit b812c37

Please sign in to comment.