public class BroadcastMissingDimensionsStrategy extends java.lang.Object implements BroadcastingStrategy
The reason for this important difference to numpy, is that we consider this as more consistent in the general case: If a dimension is not present in a tensor, we treat it as 'applicable for all' while if the dimension is present with one entry, then it is clearly defined where the values are positioned in this dimension and it would be dangerous to assume they would be applicable everywhere.
Constructor and Description |
---|
BroadcastMissingDimensionsStrategy()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
<V> TensorPair<V> |
broadcast(Tensor<V> left,
Tensor<V> right,
java.util.Set<java.lang.Class<?>> excludedDimensions)
Has to broadcast the given to tensors into a new pair of tensors, that are consistent according to the
broadcasting strategy in question.
|
static BroadcastMissingDimensionsStrategy |
get() |
java.lang.Class<BroadcastingStrategy> |
getMarkerInterface() |
@Deprecated public BroadcastMissingDimensionsStrategy()
get()
public static BroadcastMissingDimensionsStrategy get()
public <V> TensorPair<V> broadcast(Tensor<V> left, Tensor<V> right, java.util.Set<java.lang.Class<?>> excludedDimensions)
BroadcastingStrategy
broadcast
in interface BroadcastingStrategy
left
- the left tensor to broadcastright
- the right tensor to broadcastexcludedDimensions
- a set of dimensions, which should be excluded from broadcastingpublic java.lang.Class<BroadcastingStrategy> getMarkerInterface()
getMarkerInterface
in interface Option<ManipulationOption>