import zfit
import numpy as np
obs = zfit.Space('x', -10, 10)
# create the model
mu = zfit.Parameter("mu" , 2.4, -1, 5)
sigma = zfit.Parameter("sigma", 1.3, 0, 5)
gauss = zfit.pdf.Gauss(obs=obs, mu=mu, sigma=sigma)
# load the data
data_np = np.random.normal(size=10000)
data = zfit.Data(obs=obs, data=data_np)
# or sample from model
data = gauss.sample()
Traceback (most recent call last):
File "/home/pleskot/ftft/test.py", line 15, in
data = gauss.sample()
File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/core/basemodel.py", line 1196, in sample
tensor = run_tf(n=n, limits=limits, x=xclean)
File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/core/basemodel.py", line 1192, in run_tf
return self._single_hook_sample(n=n, limits=limits, x=x) # todo: make data a composite object
File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/z/zextension.py", line 332, in concrete_func
result = func_to_run(*args, **kwargs)
File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/core/basemodel.py", line 1202, in _single_hook_sample
return self._hook_sample(n=n, limits=limits)
File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/core/basepdf.py", line 785, in _hook_sample
raise tf.errors.InvalidArgumentError(msg)
TypeError: InvalidArgumentError.__init__() missing 2 required positional arguments: 'op' and 'message'
Ich habe das Gleiche mit Python 3.11 auf demselben System erlebt.
Ich versuche, zfit auf meinem Ubuntu 22.04-Laptop auszuführen. Ich habe es so installiert: [code]python -m venv venv source venv/bin/activate pip install zfit [/code] Ich habe diesen Code ausgeführt (von https://github.com/zfit/zfit): [code]import zfit import numpy as np
obs = zfit.Space('x', -10, 10)
# create the model mu = zfit.Parameter("mu" , 2.4, -1, 5) sigma = zfit.Parameter("sigma", 1.3, 0, 5) gauss = zfit.pdf.Gauss(obs=obs, mu=mu, sigma=sigma)
# load the data data_np = np.random.normal(size=10000) data = zfit.Data(obs=obs, data=data_np) # or sample from model data = gauss.sample() [/code] und ich habe diesen Fehler: [code]Traceback (most recent call last): File "/home/pleskot/ftft/test.py", line 15, in data = gauss.sample() File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/core/basemodel.py", line 1196, in sample tensor = run_tf(n=n, limits=limits, x=xclean) File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/core/basemodel.py", line 1192, in run_tf return self._single_hook_sample(n=n, limits=limits, x=x) # todo: make data a composite object File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/z/zextension.py", line 332, in concrete_func result = func_to_run(*args, **kwargs) File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/core/basemodel.py", line 1202, in _single_hook_sample return self._hook_sample(n=n, limits=limits) File "/home/pleskot/ftft/venv/lib/python3.10/site-packages/zfit/core/basepdf.py", line 785, in _hook_sample raise tf.errors.InvalidArgumentError(msg) TypeError: InvalidArgumentError.__init__() missing 2 required positional arguments: 'op' and 'message' [/code] Ich habe das Gleiche mit Python 3.11 auf demselben System erlebt.
Ich habe seit Januar einige CNNs auf Colab mit Tensorflow und TensorFlow-io trainiert. Das Training eines Modells dauerte vor ein paar Monaten mehr oder weniger 30 Minuten. Jetzt, seit einigen...
Der folgende Code stammt vor zwei Jahren und macht einen Fehler in mein aktuelles Setup. Ich habe mich gefragt, ob es mit der Änderung zu Keras 3 zusammenhängt oder was hier nicht los ist.
Ich kann...
Ich habe Probleme mit TensorFlow, wenn ich meine GPU nicht sehen kann. Ich weiß nicht, ob es ein Problem mit der Installation von CUDA 11.8 gibt, wenn mein Nvidia-Smi sagt: NVIDIA-SMI 572.70...
Ich versuche, den Code mithilfe von Yarn Build zu erstellen. Es lässt sich erfolgreich auf meinem Windows Intellij aufbauen, aber ich kann es nicht unter Ubuntu ausführen. Folgender Fehler ist...