Skip to content

ValueError: Sequential model sequential_1 cannot be built because it has no layers. Call model.add(layer). #2

@cszmzh

Description

@cszmzh

/mnt/nfs/miniconda3/envs/dl-opt/bin/python3 /mnt/work/dl-opt/GNN-MILP-main/2_training.py --type fea --data 1000 --data_path data-env2/training --embSize 8
2024-03-12 01:18:36.245997: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2024-03-12 01:18:36.274078: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-03-12 01:18:37.418090: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2024-03-12 01:18:39.183063: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1928] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 14083 MB memory: -> device: 0, name: NVIDIA GeForce RTX 4080, pci bus id: 0000:01:00.0, compute capability: 8.9
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1710177519.248527 2957036 asm_compiler.cc:252] Falling back to the CUDA driver for PTX compilation; ptxas does not support CC 8.9
W0000 00:00:1710177519.248551 2957036 asm_compiler.cc:255] Used ptxas at /usr/bin/ptxas
2024-03-12 01:18:39.248615: W tensorflow/compiler/mlir/tools/kernel_gen/transforms/gpu_kernel_to_blob_pass.cc:190] Failed to compile generated PTX with ptxas. Falling back to compilation by driver.
Traceback (most recent call last):
File "/mnt/work/dl-opt/GNN-MILP-main/2_training.py", line 119, in
model = GCNPolicy(embSize, nConsF, nEdgeF, nVarF)
File "/mnt/work/dl-opt/GNN-MILP-main/models.py", line 143, in init
self.build([
File "/mnt/nfs/miniconda3/envs/dl-opt/lib/python3.10/site-packages/keras/src/layers/layer.py", line 224, in build_wrapper
original_build_method(*args, **kwargs)
File "/mnt/work/dl-opt/GNN-MILP-main/models.py", line 176, in build
self.edge_embedding.build(ev_shape)
File "/mnt/nfs/miniconda3/envs/dl-opt/lib/python3.10/site-packages/keras/src/layers/layer.py", line 224, in build_wrapper
original_build_method(*args, **kwargs)
File "/mnt/nfs/miniconda3/envs/dl-opt/lib/python3.10/site-packages/keras/src/models/sequential.py", line 154, in build
raise ValueError(
ValueError: Sequential model sequential_1 cannot be built because it has no layers. Call model.add(layer).

Process finished with exit code 1

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