Como classificar dados estruturados usando camadas de pré-processamento do Keras avaliações
11219 avaliações
There was an error in the code, because of which the notebook wasn't executable.
Abhirama G. · Revisado há almost 3 years
good
utpal d. · Revisado há almost 3 years
Jeff H. · Revisado há almost 3 years
Diogo F. · Revisado há almost 3 years
AttributeError: 'StringLookup' object has no attribute 'vocabulary_size' def get_category_encoding_layer(name, dataset, dtype, max_tokens=None): # Create a StringLookup layer which will turn strings into integer indices if dtype == 'string': index = preprocessing.StringLookup(max_tokens=max_tokens) else: index = preprocessing.IntegerLookup(max_tokens=max_tokens) # TODO # Prepare a Dataset that only yields our feature feature_ds = dataset.map(lambda x, y: x[name]) # Learn the set of possible values and assign them a fixed integer index. index.adapt(feature_ds) # Create a Discretization for our integer indices. encoder = preprocessing.CategoryEncoding(num_tokens=index.vocabulary_size()) # Apply one-hot encoding to our indices. The lambda function captures the # layer so we can use them, or include them in the functional model later. return lambda feature: encoder(index(feature))
Nikolas H. · Revisado há almost 3 years
very clear lab, thanks!
Yulia P. · Revisado há almost 3 years
Babu L. · Revisado há almost 3 years
ramya h. · Revisado há almost 3 years
Ze M. · Revisado há almost 3 years
Satomi S. · Revisado há almost 3 years
Noushin S. · Revisado há almost 3 years
fermin h. · Revisado há almost 3 years
Mahdieh K. · Revisado há almost 3 years
Pratibha C. · Revisado há almost 3 years
Pablo V. · Revisado há almost 3 years
Shahrukh K. · Revisado há almost 3 years
Dominic L. · Revisado há almost 3 years
Yechi M. · Revisado há almost 3 years
Lorrain G. · Revisado há almost 3 years
Carlos G. · Revisado há almost 3 years
Luo,Shuyan L. · Revisado há almost 3 years
Sabyasachi B. · Revisado há almost 3 years
Naganjana R. · Revisado há almost 3 years
Kalluri Siva Kumar R. · Revisado há almost 3 years
Sean A. · Revisado há almost 3 years
Não garantimos que as avaliações publicadas sejam de consumidores que compraram ou usaram os produtos. As avaliações não são verificadas pelo Google.