Skip to content

Commit

Permalink
extracting latent spaces only BF
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryaaa committed Sep 24, 2024
1 parent f76a106 commit e84224b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CPC/extract_embedding_and_plot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# %%
import os
from embed_time.transforms import CustomToTensor, CropAndReshapeTL
from embed_time.transforms import CustomToTensor, CropAndReshapeTL, SelectChannel
from embed_time.dataloader_rs import LiveTLSDatasetPairedOutput
from torchvision.transforms import v2
import torchvision.transforms as trans
Expand All @@ -22,8 +22,8 @@
table_location = data_location / "tabular_data"
table_location.mkdir(exist_ok=True)

version = 3
model_name = "ben_model_04_masked"
version = 1
model_name = "ben_model_04_masked_BF"
out_tabular_data = table_location / model_name
out_tabular_data.mkdir(exist_ok=True)
out_tabular_data = out_tabular_data / f"version_{str(version)}"
Expand All @@ -35,7 +35,7 @@
GPU = 0
seed = 1
# first training this will be zero
checkpoint_dir = Path(base_dir) / f"2024-09-23_{model_name}_checkpoints/version_{str(version)}"
checkpoint_dir = Path(base_dir) / f"2024-09-24_{model_name}_checkpoints/version_{str(version)}"

# %%
batch_size =16
Expand Down Expand Up @@ -63,6 +63,7 @@

loading_transforms = trans.Compose([
CropAndReshapeTL(1,0,598,0),
SelectChannel(0,0),
CustomToTensor(dtype=torch.float),
v2.Resize((576,576)),
])
Expand Down

0 comments on commit e84224b

Please sign in to comment.