one_of
OneOf
¶
Bases: NumpyOp
Perform one of several possible NumpyOps.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
numpy_ops |
NumpyOp
|
A list of ops to choose between with uniform probability. |
()
|
Source code in fastestimator\fastestimator\op\numpyop\meta\one_of.py
forward
¶
Execute a randomly selected op from the list of numpy_ops
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
Union[np.ndarray, List[np.ndarray]]
|
The information to be passed to one of the wrapped operators. |
required |
state |
Dict[str, Any]
|
Information about the current execution context, for example {"mode": "train"}. |
required |
Returns:
Type | Description |
---|---|
Union[np.ndarray, List[np.ndarray]]
|
The |