Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretrained ENAS for 12layers #6

Open
MichailChatzianastasis opened this issue Sep 22, 2020 · 3 comments
Open

Pretrained ENAS for 12layers #6

MichailChatzianastasis opened this issue Sep 22, 2020 · 3 comments

Comments

@MichailChatzianastasis
Copy link

Hey,
Is there a chance to upload the pretrained ENAS model, for the 12 layers?

Thanks in advance.

@muhanzhang
Copy link
Owner

Thanks for the question. Yes, I have updated the README to include the link to the 12-layer model: https://drive.google.com/drive/folders/18GU9g5DNiHn2MOVKOiF1fCwNQMTA-mnH?usp=sharing

@MichailChatzianastasis
Copy link
Author

Thanks for your reply. I downloaded the pretrained 12-layer model , but i have the following error. As i observed, in some point , the program requires a tensor of shape (21,) which is the length of the representation of the 6-layer architecture, but now i pass a shape of (78,) which corresponds to the length of the representation of the 12-layer architecture. Is there any extra configuration, in order to make it accept the 12-layer representations?

Error:

Current idx is 0
Eval at 352352
2020-09-24 15:18:10.185416: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: 067e:00:00.0
2020-09-24 15:18:10.186298: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 1 with properties:
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: e1e6:00:00.0
2020-09-24 15:18:10.186432: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-09-24 15:18:10.186475: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-09-24 15:18:10.186526: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-09-24 15:18:10.186565: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-09-24 15:18:10.186609: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-09-24 15:18:10.186647: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-09-24 15:18:10.186671: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-09-24 15:18:10.189854: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0, 1
2020-09-24 15:18:10.189932: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-09-24 15:18:10.189947: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 1
2020-09-24 15:18:10.189958: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N N
2020-09-24 15:18:10.189967: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 1: N N
2020-09-24 15:18:10.192358: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/device:GPU:0 with 10671 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 067e:00:00.0, compute capability: 3.7)
2020-09-24 15:18:10.193297: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/device:GPU:1 with 10671 MB memory) -> physical GPU (device: 1, name: Tesla K80, pci bus id: e1e6:00:00.0, compute capability: 3.7)
HERE /device:GPU:0
Traceback (most recent call last):
File "bo.py", line 267, in
score = -eva.eval(arc)
File "/home/mchatzi/my_projects/D-VAE/bayesian_optimization/../software/enas/src/cifar10/evaluation.py", line 262, in eval
return self.ops["eval_func"](self.sess, "valid", feed_dict={self.ops["controller"]["sample_arc3"]: np.asarray(arch_str)})
File "/home/mchatzi/my_projects/D-VAE/bayesian_optimization/../software/enas/src/cifar10/eval_child.py", line 717, in customized_eval_once
acc = self.eval_once(sess, eval_set, feed_dict, verbose)
File "/home/mchatzi/my_projects/D-VAE/bayesian_optimization/../software/enas/src/cifar10/models.py", line 181, in eval_once
acc = sess.run(acc_op, feed_dict=feed_dict)
File "/anaconda/envs/azureml_py36_automl/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 754, in run
run_metadata=run_metadata)
File "/anaconda/envs/azureml_py36_automl/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1360, in run
raise six.reraise(*original_exc_info)
File "/anaconda/envs/azureml_py36_automl/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/anaconda/envs/azureml_py36_automl/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1345, in run
return self._sess.run(*args, **kwargs)
File "/anaconda/envs/azureml_py36_automl/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1418, in run
run_metadata=run_metadata)
File "/anaconda/envs/azureml_py36_automl/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1176, in run
return self._sess.run(*args, **kwargs)
File "/anaconda/envs/azureml_py36_automl/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 956, in run
run_metadata_ptr)
File "/anaconda/envs/azureml_py36_automl/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1156, in _run
(np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (78,) for Tensor 'Placeholder:0', which has shape '(21,)'

@muhanzhang
Copy link
Owner

Sorry. I forgot to mention there are some necessary changes to enable 12-layer ENAS evaluation.

First, change "outputs_6" to "outputs_12" in this line.

Second, change "child_num_layers" to 12 in this line.

Third, change "sample_structures6.txt" to "sample_structures12.txt" in this line.

Then it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants