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

'injectFaultMean' doesn't work #42

Open
ElaineYao opened this issue Dec 7, 2020 · 0 comments
Open

'injectFaultMean' doesn't work #42

ElaineYao opened this issue Dec 7, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@ElaineYao
Copy link
Contributor

I got this following error. I noticed in the source code def injectFaultMean(a, b), there is a FIXME - This only works if we call np.mean on b[0]. Need to figure out why. I was wondering what this injection function wants to do and how to avoid this error, thanks.

UnknownError (see above for traceback): exceptions.IndexError: tuple index out of range
Traceback (most recent call last):

  File "/home/elaine/.conda/envs/tensorfi/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 206, in __call__
    ret = func(*args)

  File "/home/elaine/pycharmProjects/TensorFI-master/TensorFI/injectFault.py", line 551, in injectFaultMean
    res = np.mean(a, b[0])

  File "/home/elaine/.conda/envs/tensorfi/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2957, in mean
    out=out, **kwargs)

  File "/home/elaine/.conda/envs/tensorfi/lib/python2.7/site-packages/numpy/core/_methods.py", line 57, in _mean
    rcount = _count_reduce_items(arr, axis)

  File "/home/elaine/.conda/envs/tensorfi/lib/python2.7/site-packages/numpy/core/_methods.py", line 50, in _count_reduce_items
    items *= arr.shape[ax]

IndexError: tuple index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants