Assistance Needed with HDF5GridDataset

Dear Nvidia Modulus Community,
I am seeking assistance regarding the creation of an HDF5GridDataset. I attempted to follow the example provided in the documentation, specifically the “darcy” example, but encountered some difficulties.

Here’s a brief overview of my situation:

I have an array consisting of 35 images, and I’ve organized them into pairs representing input and target data. Below is an example of how I structured the data:

import h5py
import numpy as np

input_data = np.random.rand(35, 1, 500, 500)  # Dados de entrada
target_data = np.random.rand(35, 1, 500, 500) # Dados de saída

# Salvar os dados em um arquivo HDF5
with h5py.File('dados.h5', 'w') as hdf_file:
    hdf_file.create_dataset('input', data=input_data)
    hdf_file.create_dataset('target', data=target_data)

    # Adicionar metadados para manter a paridade entre 'input' e 'target'
    hdf_file['input'].attrs['associated_target'] = 'target'
    hdf_file['target'].attrs['associated_input'] = 'input'

train_dataset = HDF5GridDataset(
        'dados.h5', invar_keys=["input"], outvar_keys=["target"]

Before proceeding further, I would like to inquire whether this approach is suitable for use with the decoder_net and the fno. Additionally, I’m curious if there is a more optimal method for creating this dataset.

Furthermore, I’m seeking guidance on what modifications, if any, should be made to the conf/config.yaml file to better adapt to my dataset structure. I found the documentation somewhat challenging to follow, so any insights or clarifications would be greatly appreciated.

Thank you in advance for your time and assistance.

Best regards,

My suggestion worked correctly, I no longer have any doubts about this topic.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.