Skip to content

Commit

Permalink
fix: remove warning spam during training (deepjavalibrary#2097)
Browse files Browse the repository at this point in the history
  • Loading branch information
tosterberg authored Oct 20, 2022
1 parent 0875edf commit ade767c
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions api/src/main/java/ai/djl/ndarray/index/NDArrayIndexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
import ai.djl.ndarray.index.full.NDIndexFullSlice;
import ai.djl.ndarray.index.full.NDIndexFullTake;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.Optional;

Expand Down Expand Up @@ -80,11 +77,6 @@ public NDArray get(NDArray array, NDIndex index) {

Optional<NDIndexFullTake> fullTake = NDIndexFullTake.fromIndex(index, array.getShape());
if (fullTake.isPresent()) {
Logger logger = LoggerFactory.getLogger(NDArrayIndexer.class);
logger.warn(
"The definition of the getter by array NDIndex: get(NDIndex array) has changed"
+ " from pick to take.If you still want to use array index as pick, then do"
+ " it explicitly by get(new NDIndex().addPickDim(array));");
return get(array, fullTake.get());
}

Expand Down

0 comments on commit ade767c

Please sign in to comment.