-
Notifications
You must be signed in to change notification settings - Fork 169
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
[Add]MRMSDataset #810
[Add]MRMSDataset #810
Conversation
Thanks for your contribution! |
ppsci/data/dataset/mrms_dataset.py
Outdated
def __getitem__(self, global_idx): | ||
_samples = [] | ||
for idx in range(global_idx, global_idx + self.num_total_timestamps): | ||
_samples.append(np.expand_dims(self.files[idx]["dataset"],axis=0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里直接固定为"dataset",不需要像另一个class一样传一个var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考上面的回复
ppsci/data/dataset/mrms_dataset.py
Outdated
input_item = {self.input_keys[0]: np.concatenate(_samples, axis=0).astype(paddle.get_default_dtype())} | ||
label_item = {} | ||
for key in self.label_keys: | ||
label_item[key] = np.asarray([], paddle.get_default_dtype()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np.asarray([], paddle.get_default_dtype())
构造一个0-size数组作用是什么呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本来是想保留一下key,但是感觉也没必要,已删除
* [Add]MRMSDataset * fix code and style
PR types
Others
PR changes
APIs
Describe