Added squeeze

This commit is contained in:
Roland Grinis 2021-03-17 07:36:35 +00:00
parent bd3425e7a5
commit efb23591a9
2 changed files with 6 additions and 0 deletions

View File

@ -266,6 +266,10 @@ public open class DoubleTensorAlgebra : TensorPartialDivisionAlgebra<Double, Dou
TODO("Not yet implemented")
}
override fun DoubleTensor.squeeze(dim: Int): DoubleTensor {
TODO("Not yet implemented")
}
}
public inline fun <R> DoubleTensorAlgebra(block: DoubleTensorAlgebra.() -> R): R =

View File

@ -86,4 +86,6 @@ public interface TensorAlgebra<T, TensorType : TensorStructure<T>> {
//https://pytorch.org/docs/stable/generated/torch.flatten.html#torch.flatten
public fun TensorType.flatten(startDim: Int, endDim: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.squeeze.html
public fun TensorType.squeeze(dim: Int): TensorType
}