Skip to content

Cannot train because of the lack of func "make_one_shot_iterator()" #71

Description

@AliceZhang-993

lack of func "make_one_shot_iterator()""get_next()",so the train_gt/test_gt can't be got.
in train.py ,there is

"with tf.name_scope('dataset'):
train_loader = DataLoader(train_folder, resize_height=height, resize_width=width)
train_dataset = train_loader(batch_size=batch_size, time_steps=num_his, num_pred=1)

train_it = train_dataset.make_one_shot_iterator()
train_videos_clips_tensor = train_it.get_next()
train_videos_clips_tensor**.set_shape**([batch_size, height, width, 3*(num_his + 1)])

train_inputs = train_videos_clips_tensor[..., 0:num_his*3]
train_gt = train_videos_clips_tensor[..., -3:]

print('train inputs = {}'.format(train_inputs))
print('train prediction gt = {}'.format(train_gt))

test_loader = DataLoader(test_folder, resize_height=height, resize_width=width)
test_dataset = test_loader(batch_size=batch_size, time_steps=num_his, num_pred=1)
test_it = test_dataset.make_one_shot_iterator()
test_videos_clips_tensor = test_it.get_next()
test_videos_clips_tensor.set_shape([batch_size, height, width, 3*(num_his + 1)])

test_inputs = test_videos_clips_tensor[..., 0:num_his*3]
test_gt = test_videos_clips_tensor[..., -3:]"
however,there is no "make_one_shot_iterator()""get_next()""set_shape" in whole project. Could you please add the above code?

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