1ef3ad90a3423ed15ca41e0ea4e81012ebe84a9f,catalyst/data/scripts/project_embeddings.py,,main,#Any#Any#,88
Before Change
if args.img_col is not None:
image_names = [
path.join(args.img_rootpath, name)
for name in df[args.img_col].values
]
img_data = np.stack(
[load_image(name, args.img_size) for name in image_names], axis=0
)
img_data = (
img_data.transpose((0, 3, 1, 2)) / 255.0 // noqa: WPS432
).astype(np.float32)
img_data = torch.from_numpy(img_data)
else:
img_data = None
After Change
summary_writer = SummaryWriter(args.out_dir)
metadata = df[meta_header].values.tolist()
metadata = [
[
str(text)
.replace("\n", " ")
.replace(r"\s", " ")
.replace(r"\s\s+", " ")
.strip()
for text in texts
]
for texts in metadata
]
assert len(metadata) == len(features)
summary_writer.add_embedding(
features,
metadata=metadata,
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances
Project Name: catalyst-team/catalyst
Commit Name: 1ef3ad90a3423ed15ca41e0ea4e81012ebe84a9f
Time: 2020-08-11
Author: scitator@gmail.com
File Name: catalyst/data/scripts/project_embeddings.py
Class Name:
Method Name: main
Project Name: undertheseanlp/underthesea
Commit Name: 244940504e919a9f5c4e191f3d121ecebec00950
Time: 2017-07-04
Author: brother.rain.1024@gmail.com
File Name: tests/chunking/test_chunking.py
Class Name:
Method Name: load_input
Project Name: oddt/oddt
Commit Name: 86698c801848975de9a21fb17093e045b6271ea3
Time: 2018-05-17
Author: maciek@wojcikowski.pl
File Name: rdkit_fixer.py
Class Name:
Method Name: PreparePDBMol
Project Name: mozilla/TTS
Commit Name: 278c7a91b77448236af73d6942da425a5d5a2e34
Time: 2019-04-28
Author: egolge@mozilla.com
File Name: datasets/preprocess.py
Class Name:
Method Name: mozilla