-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
485 additions
and
613 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
package arrayfire; | ||
|
||
import arrayfire.DataType; | ||
import arrayfire.Tensor; | ||
import arrayfire.TensorPair; | ||
import arrayfire.numbers.Num; | ||
|
||
import java.util.List; | ||
|
||
@FunctionalInterface | ||
interface GradFunction { | ||
|
||
List<Tensor<?, ?, ?, ?, ?>> grads(Tensor<?, ?, ?, ?, ?> resultGrads); | ||
List<Tensor<?, ?>> grads(Tensor<?, ?> resultGrads); | ||
|
||
interface Unary<RT extends DataType<?, ?>, RD0 extends Num<?>, RD1 extends Num<?>, RD2 extends Num<?>, RD3 extends Num<?>, I0T extends DataType<?, ?>, I0D0 extends Num<?>, I0D1 extends Num<?>, I0D2 extends Num<?>, I0D3 extends Num<?>> { | ||
Tensor<I0T, I0D0, I0D1, I0D2, I0D3> grads(Tensor<RT, RD0, RD1, RD2, RD3> result, | ||
Tensor<RT, RD0, RD1, RD2, RD3> grads); | ||
interface Unary<RT extends Tensor<?, ?>, IT extends Tensor<?, ?>> { | ||
IT grads(RT result, RT grads); | ||
} | ||
|
||
interface Binary<RT extends DataType<?, ?>, RD0 extends Num<?>, RD1 extends Num<?>, RD2 extends Num<?>, RD3 extends Num<?>, I0T extends DataType<?, ?>, I0D0 extends Num<?>, I0D1 extends Num<?>, I0D2 extends Num<?>, I0D3 extends Num<?>, I1T extends DataType<?, ?>, I1D0 extends Num<?>, I1D1 extends Num<?>, I1D2 extends Num<?>, I1D3 extends Num<?>> { | ||
TensorPair<I0T, I0D0, I0D1, I0D2, I0D3, I1T, I1D0, I1D1, I1D2, I1D3> grads( | ||
Tensor<RT, RD0, RD1, RD2, RD3> result, Tensor<RT, RD0, RD1, RD2, RD3> grads); | ||
interface Binary<RT extends Tensor<?, ?>, I0T extends Tensor<?, ?>, I1T extends Tensor<?, ?>> { | ||
TensorPair<I0T, I1T> grads(RT result, RT grads); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
package arrayfire; | ||
|
||
import arrayfire.numbers.Num; | ||
|
||
public record ImaxResult<T extends DataType<?, ?>, D0 extends Num<?>, D1 extends Num<?>, D2 extends Num<?>, D3 extends Num<?>>( | ||
Tensor<T, D0, D1, D2, D3> values, Tensor<U32, D0, D1, D2, D3> indices) { | ||
public record ImaxResult<T extends DataType<?, ?>, S extends Shape<?, ?, ?, ?>>(Tensor<T, S> values, | ||
Tensor<U32, S> indices) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.