Skip to content

Issue/3 - #8

Open
rodrigo-castellon wants to merge 38 commits into
jiwoncpark:masterfrom
rodrigo-castellon:issue/3
Open

Issue/3#8
rodrigo-castellon wants to merge 38 commits into
jiwoncpark:masterfrom
rodrigo-castellon:issue/3

Conversation

@rodrigo-castellon

Copy link
Copy Markdown
Collaborator

Set up the data pipeline for an RNN (with some extensibility to other models); RNN can now train with no problem. Still, however, may need some future work done in the realm of manipulating the (ra, dec) point coordinates into better representations of position (PointNet?) or processing them for specific network architectures (graph net, for example).

@jiwoncpark

Copy link
Copy Markdown
Owner

Seems like you went well beyond data loading! The code looks clear and very well documented. I had some minor comments. I haven't run the training myself yet, but it'd be very interesting to see how the multiple objects (right now, simply concatenated) are processed. Let's talk soon. Great work!

Comment thread exconvnet/train.py
# Instantiate posterior (for logging)
#post = getattr(inference.posterior, loss_fn.posterior_name)(val_data.Y_dim, device, valset.train_Y_mean, valset.train_Y_std)
# Instantiate model
net = getattr(models, cfg.model.architecture)(input_size=59)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get the input size from the data


__all__ = ['sigmoid']

def sigmoid(x):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def sigmoid(x): 
     return np.where(x >= 0, 
                    1 / (1 + np.exp(-x)), 
                    np.exp(x) / (1 + np.exp(x)))```

Comment thread exconvnet/train.py
# Instantiate loss function
loss_fn = getattr(losses, cfg.model.likelihood_class)()
# Instantiate posterior (for logging)
#post = getattr(inference.posterior, loss_fn.posterior_name)(val_data.Y_dim, device, valset.train_Y_mean, valset.train_Y_std)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can clean up all the h0rton code

# Declare all collate functions below #
#######################################

def collate_RNN(batch):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe come up with a basic unit test?

def __len__(self):
return self.n_data
def __getitem__(self, idx):
return torch.FloatTensor(self.X[idx]), torch.FloatTensor([self.Y[idx]])

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, a basic unit test here would be helpful (just to check the dimensions of the data and each batch, etc.)

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

Successfully merging this pull request may close these issues.

2 participants