-
Couldn't load subscription status.
- Fork 80
Description
When I enter the following code:
from trident.segmentation_models import segmentation_model_factory
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
segmentation_model = segmentation_model_factory("hest", device=device)
geojson_contours = slide.segment_tissue(segmentation_model=segmentation_model, job_dir=job_dir)
The result outputs:
slide = OpenSlideWSI(slide_path='/mnt/d/test_PDA/C3L-00277-23.svs', lazy_init=False)
segmentation_model = segmentation_model_factory("hest", device=device)
contours = slide.segmUsing cache found in /home/lf/.cache/torch/hub/pytorch_vision_v0.10.0
Fetching 1 files: 0%| | 0/1 [00:00<?, ?it/s]
deeplabv3_seg_v4.ckpt: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████
Fetching 1 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [
geojson_contours = slide.segment_tissue(segmentation_model=segmentation_model, job_dir=job_dir)
Traceback (most recent call last):
with torch.autocast(device_type=device.split(":")[0], dtype=precision, enabled=(precision != torch.float32)):
AttributeError: 'torch.device' object has no attribute 'split'