@zqbinggong
2018-05-29T00:18:23.000000Z
字数 709
阅读 903
《tensorflow实战》
age=layers.real_valued_column('age')
gender=layers.sparse_column_with_keys(column_name='gender', keys=['female', 'male'])
education=layers.sparse_column_with_hash_bucket('education', hash_bucket_size=1000)
age_range=layers.bucketized_column(age, boundaries=[18,25,30])
`combined=layers.crossed_column([age_range, race, occupation], hash_bucket_size=int(1e7))
layers.embedding_column(combined, dimension=8)