Я пытаюсь построить нейронную сеть и запустить полученный код на графическом процессоре, но застрял на этой ошибке: [code]File /tmp/virtualenvs/python3.11/lib/python3.11/site-packages/keras/src/utils/traceback_utils.py:122, in filter_traceback..error_handler(*args, **kwargs) 119 filtered_tb = _process_traceback_frames(e.__traceback__) 120 # To get the full stack trace, call: 121 # `keras.config.disable_traceback_filtering()` --> 122 raise e.with_traceback(filtered_tb) from None 123 finally: 124 del filtered_tb
File /tmp/virtualenvs/python3.11/lib/python3.11/site-packages/optree/ops.py:752, in tree_map(func, tree, is_leaf, none_is_leaf, namespace, *rests) 750 leaves, treespec = _C.flatten(tree, is_leaf, none_is_leaf, namespace) 751 flat_args = [leaves] + [treespec.flatten_up_to(r) for r in rests] --> 752 return treespec.unflatten(map(func, *flat_args))
ValueError: None values not supported. [/code] Воспроизвести ошибку очень просто: [code]from tensorflow.keras import layers, Model, Input from tensorflow.keras.models import Sequential import pandas as pd import numpy as np import tensorflow as tf
# Define the model model = Model( inputs=[input_layer], outputs=output, )
max_epochs = 10
def loss(y_true, y_pred): return 2.0
model.compile( loss=loss, optimizer='adam', )
history = model.fit( train_data_batched, epochs=max_epochs, validation_data=validation_data_batched ) [/code] Но я застрял в том, что делать, главным образом потому, что не понимаю, к чему относится ошибка ([code]None[/code] значения где?)