Utils
plot_loss_and_acc
plot_loss_and_acc (log_dir, loss_ylim=(0.0, 0.9), acc_ylim=(0.7, 1.0), save_loss=None, save_acc=None)
show_img
show_img (img, cmap=None, titles=[''], figsize=(7, 7))
plt_show
plt_show (im, cmap=None, title='', figsize=(7, 7))
tensor_to_img
tensor_to_img (t)
is_tensor
is_tensor (x)
update_norm
update_norm (tfms, mean, std, idx=None)
del_norm
del_norm (tfms, idx=None)
get_norm_id
get_norm_id (tfms)
is_norm
is_norm (x)
get_norm
get_norm (tfms)
unfreeze_model
unfreeze_model (model)
freeze_model
freeze_model (model)
unfreeze_params
unfreeze_params (params)
freeze_params
freeze_params (params)
is_unfrozen
is_unfrozen (model)
is_frozen
is_frozen (model)
params
params (m)
is_sequential
is_sequential (x)
UnNormalize
UnNormalize (mean, std, *args, **kwargs)
Normalize a tensor image with mean and standard deviation. This transform does not support PIL Image. Given mean: (mean[1],...,mean[n])
and std: (std[1],..,std[n])
for n
channels, this transform will normalize each channel of the input torch.*Tensor
i.e., output[channel] = (input[channel] - mean[channel]) / std[channel]
.. note:: This transform acts out of place, i.e., it does not mutate the input tensor.
Args: mean (sequence): Sequence of means for each channel. std (sequence): Sequence of standard deviations for each channel. inplace(bool,optional): Bool to make this operation in-place.