Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Fix code snippet in docs where indices should be int32 #989

Merged
merged 2 commits into from
May 3, 2018

Conversation

nbardy
Copy link
Contributor

@nbardy nbardy commented Apr 24, 2018

The example was returning an error due to invalid tensor type.


This change is Reviewable

@dsmilkov
Copy link
Contributor

:lgtm_strong: Thanks!


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@dsmilkov
Copy link
Contributor

One comment I just noticed tf.oneHot needs the same fix.


Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


src/ops/array_ops.ts, line 540 at r1 (raw file):

   *
   * ```js
   * tf.oneHot(tf.tensor1d([0, 1]), 3).print();

can you change it here too. oneHot requires indices to be int32?


Comments from Reviewable

@dsmilkov dsmilkov changed the title Fix indices tensor types Fix code snippet in docs where indices should be int32 Apr 24, 2018
@dsmilkov
Copy link
Contributor

dsmilkov commented May 3, 2018

Hi @nbardy , can you change tf.oneHot in the documentation too?

@manrajgrover
Copy link
Contributor

@dsmilkov I can raise a separate PR for it if it's okay

@dsmilkov
Copy link
Contributor

dsmilkov commented May 3, 2018

Thanks! Will merge this in!


Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


Comments from Reviewable

@dsmilkov
Copy link
Contributor

dsmilkov commented May 3, 2018

:lgtm_strong:


Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


Comments from Reviewable

@dsmilkov dsmilkov merged commit 52cc2f6 into tensorflow:master May 3, 2018
@tensorflow tensorflow deleted a comment from googlebot May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants