Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sjzhang-Gt opened this issue May 10, 2024 · 0 comments
Open

Comments

@sjzhang-Gt
Copy link

sjzhang-Gt commented May 10, 2024

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?

@sjzhang-Gt sjzhang-Gt changed the title Cannot train because of the lack of func "make_one_shot_iterator()",so the train_gt/test_gt can't be got Cannot train because of the lack of func "make_one_shot_iterator()" May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant