hiddenlayer icon indicating copy to clipboard operation
hiddenlayer copied to clipboard

build_graph() does not return

Open buttercutter opened this issue 4 years ago • 2 comments

I tried to use hiddenlayer on this network architecture search coding for the following search architecture, however the code could not exit and is inside build_graph() forever.

image

buttercutter avatar Sep 19 '21 17:09 buttercutter

I used this hl.build_graph(graph(train_inputs), torch.zeros([1, 3, 32, 32]).cuda()) instead and hiddenlayer gave me the following error:

Traceback (most recent call last):
  File "/home/phung/PycharmProjects/beginner_tutorial/gdas.py", line 793, in <module>
    ltrain = train_NN(forward_pass_only=0)
  File "/home/phung/PycharmProjects/beginner_tutorial/gdas.py", line 429, in train_NN
    hl.build_graph(graph(train_inputs), torch.zeros([1, 3, 32, 32]).cuda())
  File "/usr/lib/python3.9/site-packages/hiddenlayer/graph.py", line 148, in build_graph
    raise ValueError("`model` input param must be a PyTorch, TensorFlow, or Keras-with-TensorFlow-backend model.") 
ValueError: `model` input param must be a PyTorch, TensorFlow, or Keras-with-TensorFlow-backend model.

buttercutter avatar Sep 20 '21 03:09 buttercutter

I think within the graph() you should not pass the train_inputs. Try without giving the train_inputs, i.e, try this instead, hl.build_graph(graph(), torch.zeros([1, 3, 32, 32]).cuda())

dasdristanta13 avatar Jan 01 '22 20:01 dasdristanta13