Skip to content

I can't train or run Ai.py and train.py and i don't know why #44

@Exclayn

Description

@Exclayn

here is full cmd console:(myenv) D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master>python train.py
2023-09-02 21:14:03.328755: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2023-09-02 21:14:03.329056: 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.
42
2023-09-02 21:14:35.033055: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2023-09-02 21:14:35.299533: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1050 Ti computeCapability: 6.1
coreClock: 1.62GHz coreCount: 6 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 104.43GiB/s
2023-09-02 21:14:35.300724: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2023-09-02 21:14:35.301829: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cublas64_10.dll'; dlerror: cublas64_10.dll not found
2023-09-02 21:14:35.304294: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found
2023-09-02 21:14:37.799763: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2023-09-02 21:14:37.800590: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found
2023-09-02 21:14:37.801299: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cusparse64_10.dll'; dlerror: cusparse64_10.dll not found
2023-09-02 21:14:37.801998: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2023-09-02 21:14:37.802189: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1753] 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...
2023-09-02 21:14:37.870587: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-09-02 21:14:38.273215: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1636585ccf0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2023-09-02 21:14:38.273462: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2023-09-02 21:14:38.304789: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-09-02 21:14:38.305109: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263]
2023-09-02 21:14:39.500867: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
2023-09-02 21:14:40.800802: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
2023-09-02 21:14:41.233407: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
WARNING:tensorflow:period argument is deprecated. Please use save_freq to specify the frequency in number of batches seen.
2023-09-02 21:14:57.285617: I tensorflow/core/profiler/lib/profiler_session.cc:164] Profiler session started.
2023-09-02 21:14:57.356512: I tensorflow/core/profiler/internal/gpu/cupti_tracer.cc:1391] Profiler found 1 GPUs
2023-09-02 21:14:57.545541: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cupti64_101.dll'; dlerror: cupti64_101.dll not found
2023-09-02 21:14:57.547481: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cupti.dll'; dlerror: cupti.dll not found
2023-09-02 21:14:57.547789: E tensorflow/core/profiler/internal/gpu/cupti_tracer.cc:1441] function cupti_interface_->Subscribe( &subscriber_, (CUpti_CallbackFunc)ApiCallback, this)failed with error CUPTI could not be loaded or symbol could not be found.
Epoch 1/15
Traceback (most recent call last):
File "train.py", line 60, in
main()
File "train.py", line 54, in main
model = train_model(model, x, x_test, x, x_test)
File "train.py", line 41, in train_model
callbacks=checkpoints)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\engine\training.py", line 108, in _method_wrapper
return method(self, *args, **kwargs)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1098, in fit
tmp_logs = train_function(iterator)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\eager\def_function.py", line 780, in call
result = self._call(*args, **kwds)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\eager\def_function.py", line 823, in _call
self._initialize(args, kwds, add_initializers_to=initializers)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\eager\def_function.py", line 697, in _initialize
*args, **kwds))
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\eager\function.py", line 2855, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\eager\function.py", line 3213, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\eager\function.py", line 3075, in _create_graph_function
capture_by_value=self._capture_by_value),
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\framework\func_graph.py", line 986, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\eager\def_function.py", line 600, in wrapped_fn
return weak_wrapped_fn().wrapped(*args, **kwds)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\framework\func_graph.py", line 973, in wrapper
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:

D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\engine\training.py:806 train_function  *
    return step_function(self, iterator)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\engine\training.py:796 step_function  **
    outputs = model.distribute_strategy.run(run_step, args=(data,))
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:1211 run
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2585 call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2945 _call_for_each_replica
    return fn(*args, **kwargs)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\engine\training.py:789 run_step  **
    outputs = model.train_step(data)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\engine\training.py:749 train_step
    y, y_pred, sample_weight, regularization_losses=self.losses)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\engine\compile_utils.py:204 __call__
    loss_value = loss_obj(y_t, y_p, sample_weight=sw)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\losses.py:149 __call__
    losses = ag_call(y_true, y_pred)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\losses.py:253 call  **
    return ag_fn(y_true, y_pred, **self._fn_kwargs)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\util\dispatch.py:201 wrapper
    return target(*args, **kwargs)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\losses.py:1605 binary_crossentropy
    K.binary_crossentropy(y_true, y_pred, from_logits=from_logits), axis=-1)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\util\dispatch.py:201 wrapper
    return target(*args, **kwargs)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\keras\backend.py:4823 binary_crossentropy
    return nn.sigmoid_cross_entropy_with_logits(labels=target, logits=output)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\util\dispatch.py:201 wrapper
    return target(*args, **kwargs)
D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\myenv\lib\site-packages\tensorflow\python\ops\nn_impl.py:174 sigmoid_cross_entropy_with_logits
    (logits.get_shape(), labels.get_shape()))

ValueError: logits and labels must have the same shape ((32, 42) vs (32, 150, 150, 3))

(myenv) D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master>python get_model.py
2023-09-02 21:17:29.460608: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2023-09-02 21:17:29.460774: 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.
2023-09-02 21:17:46.702849: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2023-09-02 21:17:46.803251: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1050 Ti computeCapability: 6.1
coreClock: 1.62GHz coreCount: 6 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 104.43GiB/s
2023-09-02 21:17:46.804015: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2023-09-02 21:17:46.804657: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cublas64_10.dll'; dlerror: cublas64_10.dll not found
2023-09-02 21:17:46.805335: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found
2023-09-02 21:17:46.809096: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2023-09-02 21:17:46.809872: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found
2023-09-02 21:17:46.810498: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cusparse64_10.dll'; dlerror: cusparse64_10.dll not found
2023-09-02 21:17:46.810963: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2023-09-02 21:17:46.811057: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1753] 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...
2023-09-02 21:17:46.811913: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-09-02 21:17:46.957368: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x13f47cfed80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2023-09-02 21:17:46.957585: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2023-09-02 21:17:46.958559: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-09-02 21:17:46.958723: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263]
2023-09-02 21:17:47.116883: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
2023-09-02 21:17:47.924915: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
2023-09-02 21:17:48.095347: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
Model and weights saved

(myenv) D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master>python ai.py
2023-09-02 21:19:39.263161: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2023-09-02 21:19:39.263504: 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.
2023-09-02 21:19:42.428778: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2023-09-02 21:19:42.451067: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1050 Ti computeCapability: 6.1
coreClock: 1.62GHz coreCount: 6 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 104.43GiB/s
2023-09-02 21:19:42.451726: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2023-09-02 21:19:42.452415: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cublas64_10.dll'; dlerror: cublas64_10.dll not found
2023-09-02 21:19:42.453080: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found
2023-09-02 21:19:42.455131: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2023-09-02 21:19:42.457510: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found
2023-09-02 21:19:42.458771: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cusparse64_10.dll'; dlerror: cusparse64_10.dll not found
2023-09-02 21:19:42.459505: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2023-09-02 21:19:42.459641: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1753] 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...
2023-09-02 21:19:42.460399: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-09-02 21:19:42.474345: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1cb9e7c65f0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2023-09-02 21:19:42.474536: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2023-09-02 21:19:42.475270: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-09-02 21:19:42.475704: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263]
2023-09-02 21:19:42.516371: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
2023-09-02 21:19:43.473269: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
2023-09-02 21:19:43.674724: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 642252800 exceeds 10% of free system memory.
AI starting now!
Traceback (most recent call last):
File "ai.py", line 83, in
main()
File "ai.py", line 45, in main
y_ai = predict(model, screen)
File "D:\downloads\Game-Bot NIGUS MOD\Game-Bot-1-master\predict.py", line 17, in predict
x = X(Image.fromarray(X).resize((size[0] * 4, size[1] * 4),
TypeError: 'function' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions