You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use python train_main.py,then use python test_main.py,then I get:
2024-09-17 20:35:53.756602: I tensorflow/core/platform/cpu_feature_guard.cc:193] 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.
2024-09-17 20:35:54.051494: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1616] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 13402 MB memory: -> device: 0, name: NVIDIA GeForce RTX 4080, pci bus id: 0000:01:00.0, compute capability: 8.9
PATH NAME: ./kettle/saved_models/kettle_default__model.h5
Loaded model with 30708249 weights
2024-09-17 20:35:55.347888: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8201
2024-09-17 20:35:56.033993: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] INTERNAL: ptxas exited with non-zero error code -1, output:
Relying on driver to perform ptx compilation.
Modify $PATH to customize ptxas location.
This message will be only logged once.
2024-09-17 20:35:56.565133: I tensorflow/stream_executor/cuda/cuda_blas.cc:1614] TensorFloat-32 will be used for the matrix multiplication. This will only be logged once.
1000/1000 - 3s - 3s/epoch - 3ms/step
1000/1000 [==============================] - 2s 2ms/step - loss: 0.0587 - mse: 0.0587 - msle: 0.0097 - mae: 0.0267
Traceback (most recent call last):
File "D:\anaconda3\envs\tf2\lib\site-packages\numpy\core\fromnumeric.py", line 2033, in shape
result = a.shape
AttributeError: 'list' object has no attribute 'shape'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/Desktop/pruned-nilm-master/test_main.py", line 18, in
tester.test_model()
File "D:\Desktop\pruned-nilm-master\seq2point_test.py", line 67, in test_model
self.log_results(model, test_time, evaluation_metrics)
File "D:\Desktop\pruned-nilm-master\seq2point_test.py", line 107, in log_results
self.count_pruned_weights(model)
File "D:\Desktop\pruned-nilm-master\seq2point_test.py", line 124, in count_pruned_weights
if np.shape(layer.get_weights())[0] != 0:
File "<array_function internals>", line 200, in shape
File "D:\anaconda3\envs\tf2\lib\site-packages\numpy\core\fromnumeric.py", line 2035, in shape
result = asarray(a).shape
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
进程已结束,退出代码1
I do not change any code,why I get the error?
The text was updated successfully, but these errors were encountered:
I use python train_main.py,then use python test_main.py,then I get:
2024-09-17 20:35:53.756602: I tensorflow/core/platform/cpu_feature_guard.cc:193] 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.
2024-09-17 20:35:54.051494: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1616] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 13402 MB memory: -> device: 0, name: NVIDIA GeForce RTX 4080, pci bus id: 0000:01:00.0, compute capability: 8.9
PATH NAME: ./kettle/saved_models/kettle_default__model.h5
Loaded model with 30708249 weights
2024-09-17 20:35:55.347888: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8201
2024-09-17 20:35:56.033993: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] INTERNAL: ptxas exited with non-zero error code -1, output:
Relying on driver to perform ptx compilation.
Modify $PATH to customize ptxas location.
This message will be only logged once.
2024-09-17 20:35:56.565133: I tensorflow/stream_executor/cuda/cuda_blas.cc:1614] TensorFloat-32 will be used for the matrix multiplication. This will only be logged once.
1000/1000 - 3s - 3s/epoch - 3ms/step
1000/1000 [==============================] - 2s 2ms/step - loss: 0.0587 - mse: 0.0587 - msle: 0.0097 - mae: 0.0267
Traceback (most recent call last):
File "D:\anaconda3\envs\tf2\lib\site-packages\numpy\core\fromnumeric.py", line 2033, in shape
result = a.shape
AttributeError: 'list' object has no attribute 'shape'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/Desktop/pruned-nilm-master/test_main.py", line 18, in
tester.test_model()
File "D:\Desktop\pruned-nilm-master\seq2point_test.py", line 67, in test_model
self.log_results(model, test_time, evaluation_metrics)
File "D:\Desktop\pruned-nilm-master\seq2point_test.py", line 107, in log_results
self.count_pruned_weights(model)
File "D:\Desktop\pruned-nilm-master\seq2point_test.py", line 124, in count_pruned_weights
if np.shape(layer.get_weights())[0] != 0:
File "<array_function internals>", line 200, in shape
File "D:\anaconda3\envs\tf2\lib\site-packages\numpy\core\fromnumeric.py", line 2035, in shape
result = asarray(a).shape
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
进程已结束,退出代码1
I do not change any code,why I get the error?
The text was updated successfully, but these errors were encountered: