haxiomic / dts2hx

Converts TypeScript definition files (d.ts) to haxe externs (.hx) via the TypeScript compiler API
MIT License
134 stars 9 forks source link

[question] it's seem some api was lost .in Tensorflow.js #72

Open sonygod opened 3 years ago

sonygod commented 3 years ago

npx dts2hx @tensorflow/tfjs

https://www.tensorflow.org/js/guide/layers_for_keras_users?hl=en

I can't find any api like tf.layers.dense

image

image

where is wrong here.

test.ts when I use typescript.

image

maybe there is some bug here?

image

haxiomic commented 3 years ago

Thanks for the report, you're right this is a bug, tensorflow has some pretty unusual type definitions! Seems like the layers field is added in the @tensorflow/tfjs-layers library

You may be able to access it via tensorflow.tfjs_layers.dist.Exports_layers.dense(), let me know if that works or not! (I found this by using "go to definition" on dense in TypeScript)

sonygod commented 3 years ago

I'm sorry, it's not work .will you fixed this bug ?

image

image

haxiomic commented 3 years ago

I think this will be resolved by some architectural changes I have planned, however I can't give you a timeline for that dev because it happens in between breaks in my commercial work At a guess it could be ~6 months out before I can dedicate enough time to make those changes

sonygod commented 3 years ago

All right, I'm close this issue until you had time.

haxiomic commented 3 years ago

It's ok :), it's useful to know about - I'll keep it open to remind me to check that my changes do fix it