Knowledge-Graph-Hub / neat-ml

Network Embedding All the Things
BSD 3-Clause "New" or "Revised" License
18 stars 1 forks source link

Input 0 of layer "sequential" is incompatible with the layer #33

Closed caufieldjh closed 2 years ago

caufieldjh commented 2 years ago

When running the test config:

neat run --config tests/resources/test.yaml

I get the following error:

2021-11-18 17:30:40.780109: W tensorflow/core/framework/cpu_allocator_impl.cc:82] Allocation of 1635305056 exceeds 10% of free system memory.
  0% 0/4 [00:42<?, ?it/s]
Traceback (most recent call last):
  File "/usr/local/bin/neat", line 33, in <module>
    sys.exit(load_entry_point('neat==0.0.1', 'console_scripts', 'neat')())
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/neat-0.0.1-py3.7.egg/neat/cli.py", line 67, in run
  File "/usr/local/lib/python3.7/dist-packages/neat-0.0.1-py3.7.egg/neat/link_prediction/mlp_model.py", line 78, in fit
  File "/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py", line 1129, in autograph_handler
    raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:

    File "/usr/local/lib/python3.7/dist-packages/keras/engine/training.py", line 878, in train_function  *
        return step_function(self, iterator)
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/training.py", line 867, in step_function  **
        outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/training.py", line 860, in run_step  **
        outputs = model.train_step(data)
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/training.py", line 808, in train_step
        y_pred = self(x, training=True)
    File "/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
        raise e.with_traceback(filtered_tb) from None
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/input_spec.py", line 263, in assert_input_compatibility
        raise ValueError(f'Input {input_index} of layer "{layer_name}" is '

    ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 100), found shape=(None, 868)

Looks like a mismatch between the original embedding size https://github.com/Knowledge-Graph-Hub/NEAT/blob/8c9e912239e2913c52998daa538277eeb7d544b4/tests/resources/test.yaml#L69 and the additional params.

justaddcoffee commented 2 years ago

closed by #34