Peng Cheng

Results 224 comments of Peng Cheng

##### On nexus No they don't, I've used it for a long time and it's in his TODO list forever: > [TODO] Typesafe tensor sizes using literal singleton types (Scala...

Yep, easy. See my example at: https://github.com/tribbloid/shapesafe/blob/49a1c5b29d6d1ec619b2decd38c4b716cdeef713/demo/src/main/scala/edu/umontreal/kotlingrad/shapesafe/demo/DoubleVectorDemo.scala#L35-L35 ``` { val conved = x50.conv(x3) println(conved.data.size) conved.arity.internal.requireEqual(48) // conved.arity.internal.requireEqual(49) // doesn't compile } { val conved = x50.pad(5).conv(x3, 2) println(conved.data.size) conved.arity.internal.requireEqual(29) //...

just found his project: https://summerofcode.withgoogle.com/projects/#5862505638789120 Nice work!

at your service. These are my answers: #### Vectors do not (yet?) compose. The POC had only implemented DoubleVector, Not matrix or tensor. They are not difficult (ideally by stealing...

#### How do you define a function with a fixed arity? easy: ``` val _3 = Arity(3) def printD3[A Proof ): Unit = { println(v) } printD3(DoubleVector.random(3)) // printD3(DoubleVector.random(4)) //...

#### How do you write a function where one argument is fixed and the other is generic You just need to summon proofOfArity for 1 of them, something like: ```...

#### Minor issue, but the Scala plugin for IntelliJ IDEA does not type check compound expressions and must wait for compilation Even worse, sometimes it gives false errors for type...

I also have a few questions for you: - How hard it is to implement graph simplification? https://enoki.readthedocs.io/en/master/autodiff.html#graph-simplification For symbolic diff this could be tested by: $$ \frac{d (2 x^2...

I have another reason (though not 100% sure): I believe that if you want to implement it from scratch, then the mixed-mode / hybrid should always be the default graph...

Beautiful. At the simplification stage, all expressions can to be expressed as AST with some caching. E.g. the two ![](https://render.githubusercontent.com/render/math?math=x^2) in the above example: ![](https://render.githubusercontent.com/render/math?math=\frac{d}{dx}2x^2%2B3x^2=10x) can be treated as 2...