-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw useful error messages when tensor-inputs are not tensors. #202
Comments
I think this might be related... Do you plan to support tensors where arrays and numbers are currently used? For example: const shape = tf.tensor([28, 28])
const image = tf.randomNormal(shape) |
We probably won't allow shapes to be specified as tensors, unless you have a concrete use-case that needs shape to be a tensor? |
Original issue fixed in tensorflow/tfjs-core#967 |
nsthorat
pushed a commit
that referenced
this issue
Aug 19, 2019
) FEATURE See example screenshot: ![image](https://user-images.githubusercontent.com/16824702/52491877-19d52a80-2b96-11e9-8c24-5a403c2450d3.png) Fixes #686
nsthorat
pushed a commit
that referenced
this issue
Aug 19, 2019
* 0.3.x: Update the publish-npm script to allow publishing from the release branch. (#203) DEV * Upgrade 0.3.x to 0.15.3 (#210) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/tensorflow/tfjs-node/210) <!-- Reviewable:end --> * Fix win GPU packaging. (#208) (#211) Turns out that the windows GPU builds for TensorFlow 1.12 lack the directory structure and eager headers. A bug has been filed with core TF - but we should bake in some fixes for this. This PR simply refactors the downloading logic to a new file. I'd like to use this logic in the node-gles package as well (maybe worth releasing as a stand-alone package in the future). After the refactoring, I check the directory structure in Windows. If the folder structure is missing, but the required tensorflow.dll exists - I re-create the directory structure, move and download the proper header files. The screenshot below shows the contents of TF 1.12 Windows GPU: ![capture](https://user-images.githubusercontent.com/306276/53048799-719f4b80-344a-11e9-9004-3eef2446a246.PNG) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/tensorflow/tfjs-node/208) <!-- Reviewable:end --> * Bump 0.3.1 * Add TensorBoard callback for model training: tf.node.tensorBoard() (#202) (#213) FEATURE See example screenshot: ![image](https://user-images.githubusercontent.com/16824702/52491877-19d52a80-2b96-11e9-8c24-5a403c2450d3.png) Fixes #686 * [0.3.x] Upgrade nyc package fo fix lodash security issue. (#218) (#219) Bump for 0.3.x so we can get a security release spun. https://github.com/tensorflow/tfjs-node/network/alert/yarn.lock/lodash/open <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/tensorflow/tfjs-node/219) <!-- Reviewable:end --> * Bump to 0.3.2 * Upgrade TS libraries and change binding from typings file to plain TypeScript definition. * Upgrade TS dependencies * save * Fix deps-stage * save * Revert TS changes and keep binary staging fixes.
nsthorat
pushed a commit
that referenced
this issue
Aug 19, 2019
* 0.3.x: Update the publish-npm script to allow publishing from the release branch. (#203) DEV * Upgrade 0.3.x to 0.15.3 (#210) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/tensorflow/tfjs-node/210) <!-- Reviewable:end --> * Fix win GPU packaging. (#208) (#211) Turns out that the windows GPU builds for TensorFlow 1.12 lack the directory structure and eager headers. A bug has been filed with core TF - but we should bake in some fixes for this. This PR simply refactors the downloading logic to a new file. I'd like to use this logic in the node-gles package as well (maybe worth releasing as a stand-alone package in the future). After the refactoring, I check the directory structure in Windows. If the folder structure is missing, but the required tensorflow.dll exists - I re-create the directory structure, move and download the proper header files. The screenshot below shows the contents of TF 1.12 Windows GPU: ![capture](https://user-images.githubusercontent.com/306276/53048799-719f4b80-344a-11e9-9004-3eef2446a246.PNG) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/tensorflow/tfjs-node/208) <!-- Reviewable:end --> * Bump 0.3.1 * Add TensorBoard callback for model training: tf.node.tensorBoard() (#202) (#213) FEATURE See example screenshot: ![image](https://user-images.githubusercontent.com/16824702/52491877-19d52a80-2b96-11e9-8c24-5a403c2450d3.png) Fixes #686 * [0.3.x] Upgrade nyc package fo fix lodash security issue. (#218) (#219) Bump for 0.3.x so we can get a security release spun. https://github.com/tensorflow/tfjs-node/network/alert/yarn.lock/lodash/open <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/tensorflow/tfjs-node/219) <!-- Reviewable:end --> * Bump to 0.3.2 * Upgrade TS libraries and change binding from typings file to plain TypeScript definition. * Upgrade TS dependencies * save * Fix deps-stage * save * Revert TS changes and keep binary staging fixes. * Don't use a definition file for the bindings. This causes many issues and doesn't help with redistribution. It looks like exporting a local definition file on top of what else is exported is not a common supported TypeScript use case. This fix simply moves defnitions into a normal TypeScript file. This should fix: #1092 * save * Add typescript integration project. * save * Add license
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now we have cryptic errors if you pass non-tensors to ops. Let's assert inputs are valid with a useful error messages in core.
I will take this on since it's tangentially related to stuff I was going to do about accepting numbers in place of tensors in some situations.
The text was updated successfully, but these errors were encountered: