Choosing an embedding feature dimension
I think post below is a good resource.

https://developers.googleblog.com/2017/11/introducing-tensorflow-feature-columns.html

Basically, all categorical variable is initially converted to one-hot encoding, then layer size defined by dimension argument is stacked on top of one-hot encoding; thus learning optimal representation of categorical variable based on specified dimension.

There is general rule in the blog post to take the 4th root of the number of categories.

Another approach is to perform MDS to inspect your categorical variables to decide dimensions.