diff --git a/README.md b/README.md index 2928371..0882d7f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +## Install +``` +pip install -U git+https://github.com/google/svcca +``` + ## (SV)CCA for Representational Insights in Deep Neural Networks This repository contains code and [jupyter notebook tutorials](https://github.com/google/svcca/tree/master/tutorials) on results in the following papers, as well as suggested extensions and open problems. diff --git a/cca_core.py b/cca_core.py index 00aaa50..a9b8297 100644 --- a/cca_core.py +++ b/cca_core.py @@ -148,8 +148,13 @@ def compute_ccas(sigma_xx, sigma_xy, sigma_yx, sigma_yy, epsilon, if verbose: print("taking square root") - invsqrt_xx = positivedef_matrix_sqrt(inv_xx) - invsqrt_yy = positivedef_matrix_sqrt(inv_yy) + # - gives NAN errors + # invsqrt_xx = positivedef_matrix_sqrt(inv_xx) + # invsqrt_yy = positivedef_matrix_sqrt(inv_yy) + import scipy + # print('npy\'s sqrt') + invsqrt_xx = scipy.linalg.sqrtm(inv_xx) + invsqrt_yy = scipy.linalg.sqrtm(inv_yy) if verbose: print("dot products...")