google / patents-public-data

Patent analysis using the Google Patents Public Datasets on BigQuery
https://bigquery.cloud.google.com/dataset/patents-public-data:patents
Apache License 2.0
540 stars 163 forks source link

Build the Deep Neural Network in LandscapeNotebook.ipnyb #15

Closed sfd9898 closed 5 years ago

sfd9898 commented 5 years ago

Hello,

Getting the following error and have been unable to trouble shoot so far:


ImportError Traceback (most recent call last)

in ----> 1 import model 2 import importlib 3 importlib.reload(model) 4 5 model = model.LandscapeModel(td, 'data', seed_name) ~/patents-public-data/models/landscaping/model.py in 19 from keras.models import Sequential, Model 20 from keras.layers import Dense, Input, Embedding, BatchNormalization, ELU, Concatenate ---> 21 from keras.layers import LSTM, Conv1D, MaxPooling1D, Merge 22 from keras.layers.merge import concatenate 23 from keras.layers.core import Dropout ImportError: cannot import name 'Merge' Thanks!
feltenberger commented 5 years ago

Hmm, looks like this was removed from Keras. It's actually not used, so if you're feeling brave you can delete the ",Merge" from the import and delete the entire "wire_model()" function and send it over as a pull request that I can approve. That should fix your issue. I can probably get to this at some point later this week or early next week otherwise.

sfd9898 commented 5 years ago

Might take a try in the next couple days. A bit outside my expertise but I will let you know if I think I figure it out. Thanks!

sfd9898 commented 5 years ago

Submitted the edits and the chunk ran without error.

feltenberger commented 5 years ago

Good to hear. I just made the corresponding change in the master repo too. Thanks for finding the issue and confirming it now works.