We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to work on transfer learning using Mobilenet Pretrained model
model = nets.MobileNet35v2(inputs, is_training=True, classes=2) with tf.Session() as sess: nets.pretrained(model)
But this gives the following error
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-ba2d4690d272> in <module> 8 9 with tf.Session() as sess: ---> 10 nets.pretrained(model) 11 12 for i in range(0,len(epochs)): ~/.conda/envs/tf-gpu/lib/python3.6/site-packages/tensornets/pretrained.py in assign(scopes) 56 model_name = parse_scopes(scope)[0] 57 try: ---> 58 __load_dict__[model_name](scope) 59 except KeyError: 60 try: ~/.conda/envs/tf-gpu/lib/python3.6/site-packages/tensornets/pretrained.py in load_mobilenet35v2(scopes, return_fn) 550 file_hash='cf758f7f8024d39365e553ec924bb395') 551 values = parse_weights(weights_path) --> 552 return return_fn(scopes, values) 553 554 ~/.conda/envs/tf-gpu/lib/python3.6/site-packages/tensornets/pretrained.py in _assign(scopes, values) 108 109 for scope in scopes: --> 110 sess.run(pretrained_initializer(scope, values)) 111 112 ~/.conda/envs/tf-gpu/lib/python3.6/site-packages/tensornets/utils.py in pretrained_initializer(scope, values) 324 'Never mind if you are trying to load stem layers only.') 325 --> 326 if scope.dtype == tf.float16: 327 ops = [weights[0].assign(np.asarray(values[0], dtype=np.float16))] 328 for (w, v) in zip(weights[1:-2], values[1:-2]): AttributeError: 'str' object has no attribute 'dtype'
The text was updated successfully, but these errors were encountered:
@robi56, The nets.pretrained() will be depreciated. Please use sess.run(model.pretrained()) instead.
nets.pretrained()
sess.run(model.pretrained())
Sorry, something went wrong.
No branches or pull requests
I am trying to work on transfer learning using Mobilenet Pretrained model
model = nets.MobileNet35v2(inputs, is_training=True, classes=2)
with tf.Session() as sess:
nets.pretrained(model)
But this gives the following error
The text was updated successfully, but these errors were encountered: