File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -199,9 +199,15 @@ entry calculate_jacobian [num_bones][N][M][num_us]
199
199
base_positions ,
200
200
triangles ,
201
201
is_mirrored }
202
- let f = uncurry (objective model correspondences points )
203
- let J = map flatten (map (jvp f (theta ,us )) (onehots onehot .(pair (arr f64 ) (arr f64 ))))
204
- in if N == 0
202
+ let us_derivs = if num_us == 0 then 0 else 2
203
+ let f i =
204
+ let (theta' ,us' ) = onehot .onehot (onehot .(pair (arr f64 ) (arr f64 ))) i
205
+ let us'' = sized num_us (flatten (replicate (num_us / 2 ) us' ) : [num_us / 2 * 2 ]f64 )
206
+ in jvp (uncurry (objective model correspondences points ))
207
+ (theta ,us ) (trace (theta' ,us'' ))
208
+ let J = map flatten (map f (iota (theta_count + us_derivs )))
209
+
210
+ in if num_us == 0
205
211
then J
206
212
else
207
213
-- ADBench expects the packed 'us' derivatives to be in the
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ external-data/adbench/data/simple_small/hand12_t26_c100000.in https://sid.erda.d
286
286
external-data/adbench/data/simple_small/hand10_t26_c25600.in https://sid.erda.dk/share_redirect/FlhwY8rtfk/adbench/simple_small/hand10_t26_c25600.in 92f134489d16a0639598f542c4e35306511973b2951311308a0fb0d53a591ee8
287
287
external-data/adbench/data/simple_small/hand5_t26_c800.in https://sid.erda.dk/share_redirect/FlhwY8rtfk/adbench/simple_small/hand5_t26_c800.in ee635e71ce87a51dc46d00db99ca82f0465a2414f0a5404bcaf63f0d9565c244
288
288
external-data/adbench/data/simple_small/hand1_t26_c100.in https://sid.erda.dk/share_redirect/FlhwY8rtfk/adbench/simple_small/hand1_t26_c100.in e12f295af56cf8a22b2512366ca0e82ca150be6fef9b1908cb936d8113eb5005
289
- external-data/adbench/data/simple_small/hand1_t26_c100.J https://sid.erda.dk/share_redirect/FlhwY8rtfk/adbench/simple_small/hand1_t26_c100.J 8bc6551dff9a61b3e1f5ed337406e909104576cc8accd5ad34a84a15e2672e0f
289
+ external-data/adbench/data/simple_small/hand1_t26_c100.J https://sid.erda.dk/share_redirect/FlhwY8rtfk/adbench/simple_small/hand1_t26_c100.J a6bd4b69bf31533dbceb8d868e4ba5d2a9ecdcfefbf4b28bf55b372972de1333
290
290
external-data/adbench/data/2.5M/gmm_d64_K200.in.gz https://sid.erda.dk/share_redirect/FlhwY8rtfk/adbench/2.5M/gmm_d64_K200.in.gz c59573794637b767c885cc92d3fea2298a487c44116221bd771c4431bf5f5e6e
291
291
external-data/adbench/data/2.5M/gmm_d10_K200.in.gz https://sid.erda.dk/share_redirect/FlhwY8rtfk/adbench/2.5M/gmm_d10_K200.in.gz 63dc30a18faf6562a80fdc4638aef9b82f8fabbf13615c8fca51a83b12a79fb6
292
292
external-data/adbench/data/2.5M/gmm_d20_K50.in.gz https://sid.erda.dk/share_redirect/FlhwY8rtfk/adbench/2.5M/gmm_d20_K50.in.gz 20506b0a71d4eeadbad98fae14347ea25bd29fae9dae47c0e9b011955990ecd9
You can’t perform that action at this time.
0 commit comments