I know that there is a possibility in Keras with the class_weights parameter dictionary at fitting, but I couldn't find any example. Would somebody so kind to provide one?

By the way, in this case the appropriate praxis is simply to weight up the minority class proportionally to its underrepresentation?

If you are talking about the regular case, where your network produces only one output, then your assumption is correct. In order to force your algorithm to treat every instance of class 1 as 50 instances of class 0 you have to:


Define a dictionary with your labels and their associated weights

class_weight = {0: 1.,
                1: 50.,
                2: 2.}

Feed the dictionary as a parameter:

model.fit(X_train, Y_train, nb_epoch=5, batch_size=32, class_weight=class_weight)



EDIT:
"treat every instance of class 1 as 50 instances of class 0" means that in your loss function you assign higher value to these instances.
Hence, the loss becomes a weighted average, where the weight of each sample is specified by class_weight and its corresponding class. 

From Keras docs: 


  class_weight: Optional dictionary mapping class indices (integers) to a weight (float) value, used for weighting the loss function (during training only). 

