You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to use the nas interface with some tf.keras code to develop a U-net with learnable modules at each resolution. Are there any examples of using nni.mutable layers with tf.keras layers? All the examples I've found use tensorflow ops.
I get errors like this:
[11/14/2019, 10:46:01 PM] INFO (nni.nas_utils/MainThread) unet_nas/mutable_block_45_mutable_layer_0: layer: op.conv2d(size=1, fnum=fnum), optional inputs: []
[11/14/2019, 10:46:01 PM] ERROR (dstl-nas-keras/MainThread) int() argument must be a string, a bytes-like object or a number, not 'list'
Traceback (most recent call last):
File "dstl_keras_simple_nas.py", line 164, in
main()
File "dstl_keras_simple_nas.py", line 77, in main
spatial_dropout_rate=spatial_dropout, num_classes=8)
File "/tmp/twelsh/nni/annotation/tmpdlpnm2na/unet_nas.py", line 24, in create_unet
xin], {}, 0, 'classic_mode')
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/nni/smartparam.py", line 160, in mutable_layer
optional_input_size)
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/nni/nas_utils.py", line 47, in classic_mode
layer_out = funcs[chosen_layer]([fixed_inputs, real_chosen_inputs], **funcs_args[chosen_layer])
File "/tmp/twelsh/nni/annotation/tmpdlpnm2na/operators.py", line 7, in conv2d
activation='relu')(inputs)
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py", line 817, in call
self._maybe_build(inputs)
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py", line 2141, in _maybe_build
self.build(input_shapes)
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/tensorflow_core/python/keras/layers/convolutional.py", line 147, in build
input_shape = tensor_shape.TensorShape(input_shape)
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/tensorflow_core/python/framework/tensor_shape.py", line 776, in init
self._dims = [as_dimension(d) for d in dims_iter]
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/tensorflow_core/python/framework/tensor_shape.py", line 776, in
self._dims = [as_dimension(d) for d in dims_iter]
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/tensorflow_core/python/framework/tensor_shape.py", line 718, in as_dimension
return Dimension(value)
File "/home/twelsh/miniconda3/envs/nni/lib/python3.7/site-packages/tensorflow_core/python/framework/tensor_shape.py", line 193, in init
self._value = int(value)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'
How to reproduce it:
Can provide code on request
nni Environment:
nni version:1.1
nni mode(local|pai|remote): local
OS: Ubuntu 18.04
python version: 3.7
is conda or virtualenv used?: conda
is running in docker?: no
The text was updated successfully, but these errors were encountered:
@twelshed sorry for the late response. We are refactoring NNI NAS interface, the refactored interface will be released in v1.2 on next Monday. You could refer to this tutorial (https://github.com/microsoft/nni/blob/v1.2/docs/en_US/NAS/Overview.md) for the usage of the new interface. The previous NAS interface becomes deprecated.
The new NAS interface is planned to support both pytorch and tensorflow2.0, in v1.2 we only release the pytorch version, the support of tensorflow2.0 will be released in v1.3
Hello,
I am attempting to use the nas interface with some tf.keras code to develop a U-net with learnable modules at each resolution. Are there any examples of using nni.mutable layers with tf.keras layers? All the examples I've found use tensorflow ops.
I get errors like this:
How to reproduce it:
Can provide code on request
nni Environment:
The text was updated successfully, but these errors were encountered: