code stringlengths 3 6.57k |
|---|
format(v) |
range(1, 9) |
format(v) |
format(group, num_views) |
os.path.abspath(os.path.expanduser(root) |
np.random.RandomState(seed) |
format(image_size) |
self.get_paths(images_dir, group) |
self.get_paths(self.root + '/train_masks' + suff, group) |
len(self.data_path) |
len(self.data_path) |
len(self.data_path) |
KFold(n_splits=n_folds, shuffle=True, random_state=self.rs) |
list(kf.split(np.arange(num_cars) |
np.unique(map(lambda x: os.path.basename(x[:-len('_01.jpg') |
os.path.basename(self.data_path[128 + 1]) |
format(2) |
int(TRAIN_FRAC * (len(self.data_path) |
self.rs.permutation(len(self.data_path) |
dict() |
img_indices.extend(range(car_id * num_views, (car_id + 1) |
format(self.subset, fold_id, n_folds) |
self.get_test_paths(is_hq, group) |
reload_all_test_paths(self) |
ValueError('Only possible for test!') |
self.get_test_paths(self.is_hq, self.group) |
get_paths(dir_path, group) |
range(1, 9) |
join(dir_path, f) |
os.listdir(dir_path) |
isfile(join(dir_path, f) |
range(1, 9) |
format(group) |
format(group) |
format(group + 8) |
format(group + 8) |
path.endswith(ending) |
final_paths.append(path) |
final_paths.sort() |
np.asarray(final_paths) |
get_test_paths(is_hq, group='all') |
CARVANA.get_paths(join(config.input_data_dir, 'test') |
__getitem__(self, index) |
tuple (img, target) |
Image.open(self.data_path[index]) |
Image.open(self.labels_path[index]) |
np.asarray(target) |
target.convert('L') |
self.transform(img, target) |
self.transform(img) |
target.max() |
mask (max val = {}) |
format(target.max() |
assert ((target > 0) |
sum() |
Path(self.data_path[index]) |
Path(self.data_path[index]) |
__len__(self) |
len(self.data_path) |
CarvanaPlus(Dataset) |
ValueError('No test split available') |
__getitem__(self, index) |
__len__(self) |
len(self.carvana) |
im_show(img_list) |
transforms.ToPILImage() |
len(img_list) |
Exception("len(img_list) |
enumerate(img_list) |
np.array(to_PIL(img) |
plt.subplot(100 + 10 * len(img_list) |
plt.imshow(img) |
fig.axes.get_xaxis() |
set_visible(False) |
fig.axes.get_yaxis() |
set_visible(False) |
plt.show() |
save_checkpoint(state, is_best, filepath='checkpoint.pth.tar') |
torch.save(state, filepath) |
os.path.join(os.path.dirname(filepath) |
six.add_metaclass(abc.ABCMeta) |
_BaseDeterministic(distribution.Distribution) |
pmf(x; loc) |
Abs(x - loc) |
Abs(loc) |
point (or batch of points) |
statistics
(e.g., mean, mode, variance) |
tf.name_scope(name) |
dtype_util.common_dtype([loc, atol, rtol], dtype_hint=tf.float32) |
super(_BaseDeterministic, self) |
dtype_util.is_floating(self._loc.dtype) |
_slack(self, loc) |
tf.abs(loc) |
loc(self) |
Point (or batch of points) |
atol(self) |
rtol(self) |
_entropy(self) |
tf.zeros(self.batch_shape_tensor() |
_mean(self) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.