Keras Functional API を使用して DNN を構築する のレビュー

11045 件のレビュー

Victor Goicochea Flores Yemil · 約1年前にレビュー済み

Padhy Ganeswara · 約1年前にレビュー済み

Kumar Ashok · 約1年前にレビュー済み

Marcos Valdez Bazan Joao · 約1年前にレビュー済み

Velázquez Rodríguez Camilo Ernesto · 約1年前にレビュー済み

Dean Christopher · 約1年前にレビュー済み

Lam Martin · 約1年前にレビュー済み

Manfred Medina Incio Odar · 約1年前にレビュー済み

Bhasin Harsh · 約1年前にレビュー済み

Issues with defining features: def features_and_labels(row_data):     for unwanted_col in ['pickup_datetime', 'key']:         row_data.pop(unwanted_col)     label = row_data.pop(LABEL_COLUMN)     return row_data, label  # features, label # load the training data def load_dataset(pattern, batch_size=1, mode=tf.estimator.ModeKeys.EVAL):   dataset = (tf.data.experimental.make_csv_dataset(pattern, batch_size, CSV_COLUMNS, DEFAULTS)              .map(features_and_labels) # features, label              )   if mode == tf.estimator.ModeKeys.TRAIN:         dataset = dataset.shuffle(1000).repeat()   dataset = dataset.prefetch(1) # take advantage of multi-threading; 1=AUTOTUNE   return dataset ---------------------------------------------------------------------------AttributeError Traceback (most recent call last) Cell In[11], line 8 5 return row_data, label # features, label 7 # load the training data----> 8 def load_dataset(pattern, batch_size=1, mode=tf.estimator.ModeKeys.EVAL): 9 dataset = (tf.data.experimental.make_csv_dataset(pattern, batch_size, CSV_COLUMNS, DEFAULTS) 10 .map(features_and_labels) # features, label 11 ) 12 if mode == tf.estimator.ModeKeys.TRAIN:AttributeError: module 'tensorflow' has no attribute 'estimator' --------------- Per Gemini - this worked The tf.estimator module is outdated and no longer the recommended way to build models in TensorFlow. It's been largely superseded by Keras, which provides a more user-friendly and flexible API for building and training models. Here's how you can update your code to use Keras instead of tf.estimator: ------- # ... (your features_and_labels function remains the same) # Load the training data using tf.data.Dataset def load_dataset(pattern, batch_size=1, mode='eval'): # Use strings for mode dataset = (tf.data.experimental.make_csv_dataset(pattern, batch_size, CSV_COLUMNS, DEFAULTS) .map(features_and_labels) # features, label ) if mode 1 == 'train': dataset = dataset.shuffle(1000).repeat() dataset = dataset.prefetch(1) # take advantage of multi-threading; 1=AUTOTUNE return dataset ----- mode parameter: Instead of using tf.estimator.ModeKeys, we'll simply use strings like 'train' or 'eval' to represent the mode. No tf.estimator: We've removed the dependency on tf.estimator altogether.

Morrison Rod · 約1年前にレビュー済み

Great Lab!

Alejandro Mondragón Ortega Francisco · 約1年前にレビュー済み

Buzelan Ioana · 約1年前にレビュー済み

Nguyen Thomas · 約1年前にレビュー済み

Limacher David · 約1年前にレビュー済み

dev Ronny · 約1年前にレビュー済み

Ignacio Feitosa Anderson · 約1年前にレビュー済み

good

Kodipalli Seshachalam Nikhitha · 約1年前にレビュー済み

Orinel David · 約1年前にレビュー済み

黃 敬源 · 約1年前にレビュー済み

Manuel Pineda Tueros Harry · 約1年前にレビュー済み

. Sakshi Nagare · 約1年前にレビュー済み

ok

Huamani Hilario Raul · 約1年前にレビュー済み

ok

Huamani Hilario Raul · 約1年前にレビュー済み

Paredes Gallegos Víctor · 約1年前にレビュー済み

César Chipana Nuñez Paulo · 約1年前にレビュー済み

公開されたレビューが、製品を購入または使用した人によるものであることは保証されません。Google はこれらのレビューの検証を行っていません。