Skip to content

ValueError: Missing data for input "posetrans_init". #39

@alpttex19

Description

@alpttex19

I used the environment python3.7, tensorflow2.4.0, keras2.4.3
when i solved all the incompatibable things, it came out
ValueError: Missing data for input "posetrans_init". You passed a data dictionary with keys ['image_0', 'J_2d_0', 'image_1', 'J_2d_1', 'image_2', 'J_2d_2', 'image_3', 'J_2d_3', 'image_4', 'J_2d_4', 'image_5', 'J_2d_5', 'image_6', 'J_2d_6', 'image_7', 'J_2d_7']. Expected the following keys: ['image_0', 'image_1', 'image_2', 'image_3', 'image_4', 'image_5', 'image_6', 'image_7', 'J_2d_0', 'J_2d_1', 'J_2d_2', 'J_2d_3', 'J_2d_4', 'J_2d_5', 'J_2d_6', 'J_2d_7', 'posetrans_init']

here are the codes
`def opt_pose(self, segmentations, joints_2d, opt_steps):
data = {}
supervision = {}

    for i in range(self.num):
        data['image_{}'.format(i)] = np.tile(
            np.float32(segmentations[i].reshape((1, self.img_size, self.img_size, -1))),
            (opt_steps, 1, 1, 1)
        )
        data['J_2d_{}'.format(i)] = np.tile(
            np.float32(np.expand_dims(joints_2d[i], 0)),
            (opt_steps, 1, 1)
        )
        supervision['J_reproj_{}'.format(i)] = np.tile(
            np.float32(np.expand_dims(joints_2d[i], 0)),
            (opt_steps, 1, 1)
        )

    with tqdm(total=opt_steps) as pbar:
        self.opt_pose_model.fit(
            data, supervision,
            batch_size=1, epochs=1, verbose=0,
            callbacks=[LambdaCallback(on_batch_end=lambda e, l: pbar.update(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