duplicate
Duplicate
Duplicate an input and apply two different transforms. Used for SimCLR primarily.
Source code in fmcib/transforms/duplicate.py
__call__(input)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input
|
torch.Tensor or any other type supported by the given transforms
|
Input. |
required |
Returns:
Type | Description |
---|---|
Tuple[Tensor, Tensor]
|
Tuple[torch.Tensor, torch.Tensor]: A tuple of two tensors. |
Source code in fmcib/transforms/duplicate.py
__init__(transforms1=None, transforms2=None)
Duplicates an input and applies the given transformations to each copy separately.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
transforms1
|
Optional[Callable]
|
description. Default is None. |
None
|
transforms2
|
Optional[Callable]
|
description. Default is None. |
None
|