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

set_ticks() takes 2 positional arguments but 3 were given #36

Open
touseeftahir opened this issue Apr 10, 2021 · 7 comments
Open

set_ticks() takes 2 positional arguments but 3 were given #36

touseeftahir opened this issue Apr 10, 2021 · 7 comments

Comments

@touseeftahir
Copy link

Getting this error when I try to train

Traceback (most recent call last):
File "emotions.py", line 98, in
plot_model_history(model_info)
File "emotions.py", line 31, in plot_model_history
axs[0].set_xticks(np.arange(1,len(model_history.history['accuracy'])+1),len(model_history.history['accuracy'])/10)
File "/home/touseef/.local/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 73, in wrapper
return get_method(self)(*args, **kwargs)
TypeError: set_ticks() takes 2 positional arguments but 3 were given

@LuccaMartins
Copy link

Hi!
Did you handle to fix this error?

@al2helal
Copy link

al2helal commented Oct 4, 2021

I got this error also. I removed len(model_history.history['accuracy'])/10 the 2nd argument, then works for me.

@LuccaMartins
Copy link

LuccaMartins commented Oct 4, 2021 via email

@massjeya
Copy link

massjeya commented Jan 2, 2022

C:\pythonProject\venv\Scripts\python.exe C:/pythonProject/Emotion-detection-master/src/emotions.py
2022-01-02 18:55:15.740268: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-01-02 18:55:15.765399: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

@massjeya
Copy link

massjeya commented Jan 2, 2022

2022-01-02 18:55:56.745467: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-01-02 18:55:56.746031: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublas64_11.dll'; dlerror: cublas64_11.dll not found
2022-01-02 18:55:56.747238: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublasLt64_11.dll'; dlerror: cublasLt64_11.dll not found
2022-01-02 18:55:56.748392: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found
2022-01-02 18:55:56.749425: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'curand64_10.dll'; dlerror: curand64_10.dll not found
2022-01-02 18:55:56.750661: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cusolver64_11.dll'; dlerror: cusolver64_11.dll not found
2022-01-02 18:55:56.787654: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cusparse64_11.dll'; dlerror: cusparse64_11.dll not found
2022-01-02 18:55:56.788946: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found
2022-01-02 18:55:56.789289: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2022-01-02 18:55:56.852808: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

Process finished with exit code 0
why dont get the output what should i change

@dwcahyo23
Copy link

I got this error also. I removed len(model_history.history['accuracy'])/10 the 2nd argument, then works for me.

in new update matplotlib.pyplot.xticks 3.5.1 just add "step="

set_xticks(np.arange(1,len(model_history.history['loss'])+1),step=len(model_history.history['loss'])/10)

@dwcahyo23
Copy link

2022-01-02 18:55:56.745467: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2022-01-02 18:55:56.746031: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublas64_11.dll'; dlerror: cublas64_11.dll not found 2022-01-02 18:55:56.747238: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublasLt64_11.dll'; dlerror: cublasLt64_11.dll not found 2022-01-02 18:55:56.748392: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found 2022-01-02 18:55:56.749425: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'curand64_10.dll'; dlerror: curand64_10.dll not found 2022-01-02 18:55:56.750661: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cusolver64_11.dll'; dlerror: cusolver64_11.dll not found 2022-01-02 18:55:56.787654: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cusparse64_11.dll'; dlerror: cusparse64_11.dll not found 2022-01-02 18:55:56.788946: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found 2022-01-02 18:55:56.789289: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2022-01-02 18:55:56.852808: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

Process finished with exit code 0 why dont get the output what should i change

you must need cudart64_110.dll , just install CUDA Toolkit 11.0
https://developer.nvidia.com/cuda-11.0-download-archive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants