google / nerfies

This is the code for Deformable Neural Radiance Fields, a.k.a. Nerfies.

Home Page:https://nerfies.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on Nerfies Training v2.ipynb

juanalonso opened this issue · comments

Hi!

I'm trying to run the notebook Nerfies Training v2.ipynb (using the Colab environment) and I'm getting this error in the "Configuration" cell, both for GPU and TPU.

ImportError                               Traceback (most recent call last)

<ipython-input-5-be45ab41e1a4> in <module>()
      6 from IPython.display import display, Markdown
      7 
----> 8 from nerfies import configs
      9 
     10 

/usr/local/lib/python3.7/dist-packages/nerfies/configs.py in <module>()
     17 
     18 import dataclasses
---> 19 from flax import nn
     20 import gin
     21 import immutabledict

ImportError: cannot import name 'nn' from 'flax' (/usr/local/lib/python3.7/dist-packages/flax/__init__.py)

It seems that flax.nn is deprecated and flax.linen should be used instead.

Thank you very much

commented

I replaced line 18 with from flax import linen as nn and then the notebook ran as expected

I just submitted a pull request to fix this