Skip to content

Incompatible shapes error while running MIDAS recursively #43

@infiniteline

Description

@infiniteline

Hi all,

I'm recursively running imputation on a dataset of participants (using only each participant's data to train the model). It runs fine but throws an error with the 127th participant. If I run the code again (even without re-initializing the model), and only use the data for that participant, it runs fine. Any suggestions?

Here's a chunk of the error:

---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/client/session.py:1378, in BaseSession._do_call(self, fn, *args)
   1377 try:
-> 1378   return fn(*args)
   1379 except errors.OpError as e:

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/client/session.py:1361, in BaseSession._do_run.<locals>._run_fn(feed_dict, fetch_list, target_list, options, run_metadata)
   1360 self._extend_graph()
-> 1361 return self._call_tf_sessionrun(options, feed_dict, fetch_list,
   1362                                 target_list, run_metadata)

File ~/opt/anaconda3/lib/python3.9/site-packages/tensorflow/python/client/session.py:1454, in BaseSession._call_tf_sessionrun(self, options, feed_dict, fetch_list, target_list, run_metadata)
   1452 def _call_tf_sessionrun(self, options, feed_dict, fetch_list, target_list,
   1453                         run_metadata):
-> 1454   return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
   1455                                           fetch_list, target_list,
   1456                                           run_metadata)

InvalidArgumentError: Incompatible shapes: [15] vs. [0]
	 [[{{node AdamW/gradients/gradients/mean_squared_error_2/SquaredDifference_grad/mul_1}}]]

NOTE: I'm not running tensorflow < 2.12 as there doesn't seem to be an ARM distribution for that version. Seems to run well most of the time, but... ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions