Skip to content
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

Clarify batch_norm documentation to highlight that the dimensions for… #15653

Closed
wants to merge 4,256 commits into from
Closed

Clarify batch_norm documentation to highlight that the dimensions for… #15653

wants to merge 4,256 commits into from

Conversation

Netzeband
Copy link
Contributor

... normalization depend on the shape of the tensor.

tjingrant and others added 30 commits December 14, 2017 13:24
* Random flip benchmark

* More benchmarks
- Use `nvidia/cuda:9.0-base-ubuntu16.04` as the base image to select
  just the CUDA libraries we need.
- Remove the installed static libraries.
- Remove the dependency on openjdk-8 since Bazel ships with a local copy.
- Perform a shallow clone of the repository.

The image is 2.94GB, down from 4.87GB.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
CMake: configure default string values of options properly
Forward declare condition_variable, fix for #14388
Change "'", which causes incorrect highlight, to "`"
- Adding comment about error if not casted to long first
- Return error message if resolving path failed on FreeBSD
* Don't add -ltensorflow_framework to sysconfig LFLAGS if the build is monolithic
…file

index_to_string_table_from_file can use tf.string as vocabulary file
Add description for new PR workflow.
This fix is an effort to add libsvm format support with
the implementation of `decode_libsvm`, as was proposed in 14313.

The implementation is done in contrib with:

This fix fixes 14313.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
yupbank and others added 11 commits December 26, 2017 18:39
* Add templated functions for `safe_strto[f|d|i32|i64|u32|u64]`

While working on 14330 I noticed that there is no templated functions for
`safe_strto[f|d|i32|i64|u32|u64]`. As a result, an additional wrapper
has to be created in different places to apply the typename in a
templated class or function. Examples include the existing implementations
in `tensorflow/core/kernels/string_to_number_op.cc` (`Convert`),
`tensorflow/core/lib/strings/proto_text_util.h` (`ProtoParseNumeric`),
and in 14330.
It might make sense to add a templated function for `safe_strto[f|d|i32|i64|u32|u64]`
to avoid existing and future code duplications.
This fix adds
```
template<typename T>
bool SafeStringToNumeric(StringPiece s, T* value);
```
to address the above mentioned issue.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Move ProtoParseNumeric to numbers.h, and use overloading in template

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add int64 support for BroadcastArgs and BroadcastGradientArgs

In `array_ops.cc`, both int32 and int64 are expected to be supported
for `BroadcastArgs` and `BroadcastGradientArgs`. However, this was
not the case as only int32 kernel are registered even though `T`
is part of the `TypeConstraint`.

This fix adds the int64 kernel support for `BroadcastArgs` and
`BroadcastGradientArgs`, and adds related test cases.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add test cases for int64 support of BroadcastArgs and BroadcastGradientArgs

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Sanitize python and clang-format.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix discrepancy between doc and impl for `tf.reverse`

This fix tries to address the discrepancy between doc and
implementations for `tf.reverse`. In the documentation,
both int32 and int64 could be used for axis.

However, the actual implementation of the `tf.reverse` does
not support int64 and caused missing kernel error:
```python
ubuntu@ubuntu:~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> v = tf.reverse_v2([1, 2, 3], tf.constant([0], tf.int64))
>>> sess = tf.Session()
>>> sess.run(v)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 889, in run
    run_metadata_ptr)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1120, in _run
    feed_dict_tensor, options, run_metadata)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1317, in _do_run
    options, run_metadata)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1336, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'ReverseV2' with these attrs.  Registered devices: [CPU], Registered kernels:
  device='CPU'; T in [DT_STRING]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_BOOL]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_COMPLEX128]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_COMPLEX64]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_DOUBLE]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_FLOAT]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_HALF]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_INT8]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_UINT8]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_INT16]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_UINT16]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_INT32]; Tidx in [DT_INT32]
  device='CPU'; T in [DT_INT64]; Tidx in [DT_INT32]

         [[Node: ReverseV2 = ReverseV2[T=DT_INT32, Tidx=DT_INT64](ReverseV2/tensor, Const)]]

```
This fix addresses this issue and added the int64 support
for axis in `tf.reverse`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add GPU support of int64 axis in `tf.reverse`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add test cases for int64 support of axis in `tf.reverse`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add OpenCL int64 support of axis in `tf.reverse`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* ENH: implement cohen_kappa

* TST: add test cases

* DOC: add document

* DOC: revise document as suggested

* CLN: drop total prefix

* CLN: wrap lines to 80 chars in metric_ops.py

* CLN: remove unneeded dependency

* DOC: support labels datatype

* TST: add explanation for testBasic

* TST: remove testBasic2

* TST: replace all random data

* CLN: remove sklearn dependency

* TST: wrap the lines in this test to 80 chars

* DOC: clean format

* CLN: typo

* CLN: lables specifiy -1 axis

* CLN: remove float lables support

* DOC: modify document of _safe_div

* CLN: rename predictions -> predictions_idx

* TST: invalid dim case

* CLN: clean codes

* DOC: remove total_ in update_op
* mpi_collectives: Refactor to fix build issues

After TF commit 5c7f9e3, the mpi_collectives package would no longer build
ops and kernels. This build issue caused mpi_collectives import to fail in
Python with the following error: "NameError: Could not find operator MPISize
in dynamic library mpi_collectives.so".

To fix this issue, add build targets to ensure both ops and kernels are built
Note, also refactored the build targets and directory structure to more
closely match other contrib packages.

* mpi_collectives: Minor BUILD fix

* Minor: Buildifier fix

* mpi_collectives: Correct preprocessor defines

* mpi_collectives: Clearer defines inclusion
…format (#14120)

* TST: add test case

* BUG: fix unknown spatial dim for NC format

* Make comment more informative
…tracking_alloc_test fixed for GPU (#14530)

* session_clusterspec_prop_test fix for GPU

* common_runtime_direct_session_with_tracking_alloc_test fix for GPU
… normalization depend on the shape of the tensor.
… normalization depend on the shape of the tensor.
@tensorflow-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot. The email used to register you as an authorized contributor must be the email used for the Git commit.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@Netzeband
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@Netzeband
Copy link
Contributor Author

Yes I used a different e-mail address for the commit. I cannot add this address to the google account where I signed the contract.

@drpngx
Copy link
Contributor

drpngx commented Dec 27, 2017

Could you change the email address on the commit?

@drpngx drpngx added the stat:awaiting response Status - Awaiting response from author label Dec 27, 2017
@Netzeband
Copy link
Contributor Author

Ok I changed the e-mail address in my commit. However this is not a standard procedure with git and requires to rewrite all commits. As far as I can see, this pull-request just contains my change, so I think it should work now.

@drpngx
Copy link
Contributor

drpngx commented Dec 29, 2017

OK, maybe let's wait until the next refresh.

@drpngx
Copy link
Contributor

drpngx commented Dec 29, 2017

@Netzeband Still broken. I don'y anything pushed. You can amend the commit with --author and push again.

@Netzeband
Copy link
Contributor Author

I think this will go into the wrong direction, I will close the request and setup a new one, where not the whole commit history have been rewritten (due to the e-mail address change).

@Netzeband Netzeband closed this Dec 30, 2017
@Netzeband Netzeband deleted the clarify_batch_norm_documentation branch December 30, 2017 07:53
@Netzeband
Copy link
Contributor Author

I created a new request: #15728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: no stat:awaiting response Status - Awaiting response from author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet