-
المساهمات
1548 -
تاريخ الانضمام
-
تاريخ آخر زيارة
-
عدد الأيام التي تصدر بها
11
آخر يوم ربح فيه Ali Ahmed55 هو ديسمبر 20 2024
Ali Ahmed55 حاصل على أكثر محتوى إعجابًا!
آخر الزوار
1657 زيارة للملف الشخصي
إنجازات Ali Ahmed55
عضو نشيط (3/3)
1.2k
السمعة بالموقع
-
Ali Ahmed55 بدأ بمتابعة لاستخدام نموذج الـ DeepHit لازم احول عمود الـ efs_time الي فئات ؟ هي داله التنشيط sigmoid بستخدم مع التنبوء والا التصنيف ؟ هو ازي اقدر اعمل ده Use pip on the notebook to install. Then add it to your dependencies علي Kaggle Notebook بحيث اقدر اشغل المكتبه من غير الانترنت ؟ 2 آخرين
-
السلام عليكم انا عند عمود الefs ود عبار عن efs,Event-free survival,Categorical,['Event' 'Censoring'] انا عاوز اتنباء بقيمه الefs عاوز تكون القيمه كده فا اسخدم sigmoid ؟ وكمان استخدم الTanh والا الrelu ؟ ID,prediction 28800,0.5 28801,1.2 28802,0.8 etc.
-
الا مش من الكود الان انا استخدم الGUP 4 اشغل عادي ولكن انا الاسف مش عارف جيب لحضرتك copy الخطاء الان بسخدم الkaggle Notebook هو ده --------------------------------------------------------------------------- NotFoundError Traceback (most recent call last) Cell In[24], line 2 1 # Training the Keras model with the specified data, epochs, batch size, and callbacks ----> 2 deep_hit_model.fit( 3 x_train_scaled, 4 {"time-output": y_time_train, "event-output": y_event_train}, 5 validation_data=(x_test_scaled, {"time-output": y_time_test, "event-output": y_event_test}), 6 epochs=50, 7 batch_size=128, 8 callbacks=[keras.callbacks.EarlyStopping(monitor="val_loss", patience=10, restore_best_weights=True)] 9 ) File /usr/local/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py:122, in filter_traceback.<locals>.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 /usr/local/lib/python3.10/site-packages/tensorflow/python/eager/execute.py:53, in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name) 51 try: 52 ctx.ensure_initialized() ---> 53 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, 54 inputs, attrs, num_outputs) 55 except core._NotOkStatusException as e: 56 if name is not None: NotFoundError: Graph execution error: Detected at node StatefulPartitionedCall defined at (most recent call last): File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code File "/usr/local/lib/python3.10/site-packages/ipykernel_launcher.py", line 18, in <module> File "/usr/local/lib/python3.10/site-packages/traitlets/config/application.py", line 1075, in launch_instance File "/usr/local/lib/python3.10/site-packages/ipykernel/kernelapp.py", line 737, in start File "/usr/local/lib/python3.10/site-packages/anyio/_core/_eventloop.py", line 74, in run File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2303, in run File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 216, in run File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run File "/usr/local/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 428, in process_shell File "/usr/local/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 501, in process_shell_message File "/usr/local/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 337, in execute_request File "/usr/local/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 752, in execute_request File "/usr/local/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 433, in do_execute File "/usr/local/lib/python3.10/site-packages/ipykernel/zmqshell.py", line 582, in run_cell File "/usr/local/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3075, in run_cell File "/usr/local/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3130, in _run_cell File "/usr/local/lib/python3.10/site-packages/IPython/core/async_helpers.py", line 128, in _pseudo_sync_runner File "/usr/local/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3334, in run_cell_async File "/usr/local/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3517, in run_ast_nodes File "/usr/local/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code File "/tmp/ipykernel_10/1147730535.py", line 2, in <module> File "/usr/local/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py", line 117, in error_handler File "/usr/local/lib/python3.10/site-packages/keras/src/backend/tensorflow/trainer.py", line 371, in fit File "/usr/local/lib/python3.10/site-packages/keras/src/backend/tensorflow/trainer.py", line 219, in function File "/usr/local/lib/python3.10/site-packages/keras/src/backend/tensorflow/trainer.py", line 132, in multi_step_on_iterator could not find registered transfer manager for platform Host -- check target linkage [[{{node StatefulPartitionedCall}}]] [Op:__inference_multi_step_on_iterator_6647]
-
السلام عليكم هو اي الفرق مابين GPU T4 * 2 - GPU P100 - TPU vm v3-8 ؟
- 5 اجابة
-
- 2
-
يعني الكود ده مبتدي تمام # Construct # Separate features (X) and target variables (y) x = data_train.drop(['efs', 'efs_time'], axis=1, inplace=False) # Features (all columns except 'efs' and 'efs_time') y_event = data_train['efs'] # First target variable (event outcome) y_time = data_train['efs_time'] # Second target variable (event time) # Step 1: Split data into 70% training and 30% temporary set (which will be further split) x_train, x_temp, y_event_train, y_event_temp, y_time_train, y_time_temp = train_test_split(x, y_event, y_time, test_size=0.3, random_state=42) # Step 2: Split the temporary set into 15% validation (dev) and 15% test x_dev, x_test, y_event_dev, y_event_test, y_time_dev, y_time_test = train_test_split(x_temp, y_event_temp, y_time_temp, test_size=0.5, random_state=42) # Print dataset sizes for verification #print(f"X_train: {x_train.shape}, x_dev: {x_dev.shape}, X_test: {x_test.shape}") #print(f"y_event_train: {y_event_train.shape}, y_event_dev: {y_event_dev.shape}, y_event_test: {y_event_test.shape}") #print(f"y_time_train: {y_time_train.shape}, y_time_dev: {y_time_dev.shape}, y_time_test: {y_time_test.shape}") NUM_DURATIONS = 10 # Step 3: Apply standard scaling to the features to standardize the data scaler = StandardScaler() # Initialize the scaler x_train_scaled = scaler.fit_transform(x_train) # Fit the scaler on the training data and transform it x_test_scaled = scaler.transform(x_test) # Transform the test data based on the scaler fit on the training data # Define the input dimension based on the number of features in the training data input_dim = x_train_scaled.shape[1] # Define the input layer with the shape matching the feature dimension inputs = keras.layers.Input(shape=(input_dim,)) # Add the first dense layer with 128 neurons and ReLU activation # This layer processes the input data to extract complex features x = keras.layers.Dense(128, activation='relu')(inputs) x = keras.layers.BatchNormalization()(x) # Add the second dense layer with 64 neurons and ReLU activation # This further processes the output from the previous layer to capture more intricate patterns x = keras.layers.Dense(64, activation='relu')(x) x = keras.layers.BatchNormalization()(x) # Add the third dense layer with 32 neurons and ReLU activation # This layer continues refining the learned features from the previous layers x = keras.layers.Dense(32, activation='relu')(x) # The output layer for predicting the time-to-event intervals, using the 'softmax' activation function. # This allows the model to predict the probability distribution over multiple time bins (e.g., different durations). output_time = keras.layers.Dense(1, activation='relu', name='time-output')(x) # The output layer for predicting the event outcome (e.g., whether the event occurred or was censored), # using the 'sigmoid' activation function. This gives a probability value between 0 and 1. output_event = keras.layers.Dense(1, activation='sigmoid', name='event-output')(x) # Constructing the final model, which takes the 'inputs' and outputs both the time-to-event predictions # and the event predictions. This is a multi-output model designed for survival analysis tasks. deep_hit_model = keras.models.Model(inputs=inputs, outputs=[output_time, output_event]) # Compiling the Keras model with the specified optimizer, loss function, and metrics deep_hit_model.compile( optimizer = tf.keras.optimizers.AdamW( learning_rate=0.001, weight_decay=0.004, beta_1=0.9, beta_2=0.999, epsilon=1e-07, amsgrad=False, clipnorm=None, clipvalue=None, global_clipnorm=None, use_ema=False, ema_momentum=0.99, ema_overwrite_frequency=None, loss_scale_factor=None, gradient_accumulation_steps=None, name='adamw',), loss = {"time-output": "mean_squared_error", "event-output": "mean_squared_error"}, metrics = {"time-output": "mean_absolute_error", "event-output": "mean_absolute_error"} ) # Training the Keras model with the specified data, epochs, batch size, and callbacks deep_hit_model.fit( x_train_scaled, {"time-output": y_time_train, "event-output": y_event_train}, validation_data=(x_test_scaled, {"time-output": y_time_test, "event-output": y_event_test}), epochs=50, batch_size=128, callbacks=[keras.callbacks.EarlyStopping(monitor="val_loss", patience=10, restore_best_weights=True)] )
- 9 اجابة
-
- 1
-
السلام عليكم هو عشان استخدم نموذج الDeepHit الازم احول عمود الefs_time الي فئات ؟ او الازم ان تكون المكشله مشكله تصنيف مش هينفع يكون تنبوء ؟
- 9 اجابة
-
- 3