Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarriba committed Apr 28, 2021
1 parent 7659da3 commit 409a38a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions flash/vision/segmentation/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from pytorch_lightning.utilities.exceptions import MisconfigurationException
from torch.utils.data import Dataset

import flash.vision.segmentation.transforms as T
from flash.core.classification import SegmentationLabels
from flash.data.auto_dataset import AutoDataset
from flash.data.base_viz import BaseVisualization # for viz
Expand All @@ -30,8 +31,6 @@
from flash.data.process import Preprocess
from flash.utils.imports import _MATPLOTLIB_AVAILABLE

from . import transforms as T

if _MATPLOTLIB_AVAILABLE:
import matplotlib.pyplot as plt
else:
Expand Down
4 changes: 2 additions & 2 deletions flash_examples/finetuning/semantic_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def load_data(data_root: str = 'data/') -> Tuple[List[str], List[str]]:

# 2.2 Visualise the samples
labels_map = SegmentationLabels.create_random_labels_map(num_classes=21)
datamodule.set_map_labels(labels_map)
datamodule.set_labels_map(labels_map)
datamodule.show_train_batch("load_sample")
datamodule.show_train_batch("post_tensor_transform")

Expand All @@ -69,7 +69,7 @@ def load_data(data_root: str = 'data/') -> Tuple[List[str], List[str]]:

# 4. Create the trainer.
trainer = flash.Trainer(
max_epochs=20,
max_epochs=5,
gpus=1,
# precision=16, # why slower ? :)
)
Expand Down

0 comments on commit 409a38a

Please sign in to comment.