{"action":"created","issue":{"url":"https://api.github.com/repos/keras-team/keras/issues/10560","repository_url":"https://api.github.com/repos/keras-team/keras","labels_url":"https://api.github.com/repos/keras-team/keras/issues/10560/labels{/name}","comments_url":"https://api.github.com/repos/keras-team/keras/issues/10560/comments","events_url":"https://api.github.com/repos/keras-team/keras/issues/10560/events","html_url":"https://github.com/keras-team/keras/issues/10560","id":336596336,"node_id":"MDU6SXNzdWUzMzY1OTYzMzY=","number":10560,"title":"Can't Change layer.name Attribute","user":{"login":"joaogantunes","id":32456543,"node_id":"MDQ6VXNlcjMyNDU2NTQz","avatar_url":"https://avatars2.githubusercontent.com/u/32456543?v=4","gravatar_id":"","url":"https://api.github.com/users/joaogantunes","html_url":"https://github.com/joaogantunes","followers_url":"https://api.github.com/users/joaogantunes/followers","following_url":"https://api.github.com/users/joaogantunes/following{/other_user}","gists_url":"https://api.github.com/users/joaogantunes/gists{/gist_id}","starred_url":"https://api.github.com/users/joaogantunes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaogantunes/subscriptions","organizations_url":"https://api.github.com/users/joaogantunes/orgs","repos_url":"https://api.github.com/users/joaogantunes/repos","events_url":"https://api.github.com/users/joaogantunes/events{/privacy}","received_events_url":"https://api.github.com/users/joaogantunes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-28T12:16:43Z","updated_at":"2018-07-09T17:02:43Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI have trained 2 separate CNN models, one for RGB and one for Optical flow. I am now trying to fuse them into a single network. I load the RGB weights, and the optical flow weights and then need to change the names on the optical flow stream to have unique names on all layers I use this code:\r\n\r\n`\r\n\r\n        for layer in original_flow_stream.layers:\r\n            # Change layer names (add an of for the optical flow layers)\r\n            layer.name = layer.name + str(\"of\")\r\n            layer.trainable = False\r\n        return original_flow_stream\r\n`\r\nI get the following error: \r\n   layer.name = layer.name + str(\"of\")\r\nAttributeError: can't set attribute\r\n\r\n\r\nSaying I can't set the name of the layer. Why am I getting this error? I'm using Keras 2.1.5 with a Tensorflow backend.\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/keras-team/keras/issues/comments/403549003","html_url":"https://github.com/keras-team/keras/issues/10560#issuecomment-403549003","issue_url":"https://api.github.com/repos/keras-team/keras/issues/10560","id":403549003,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzU0OTAwMw==","user":{"login":"spate141","id":10580847,"node_id":"MDQ6VXNlcjEwNTgwODQ3","avatar_url":"https://avatars2.githubusercontent.com/u/10580847?v=4","gravatar_id":"","url":"https://api.github.com/users/spate141","html_url":"https://github.com/spate141","followers_url":"https://api.github.com/users/spate141/followers","following_url":"https://api.github.com/users/spate141/following{/other_user}","gists_url":"https://api.github.com/users/spate141/gists{/gist_id}","starred_url":"https://api.github.com/users/spate141/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spate141/subscriptions","organizations_url":"https://api.github.com/users/spate141/orgs","repos_url":"https://api.github.com/users/spate141/repos","events_url":"https://api.github.com/users/spate141/events{/privacy}","received_events_url":"https://api.github.com/users/spate141/received_events","type":"User","site_admin":false},"created_at":"2018-07-09T17:02:42Z","updated_at":"2018-07-09T17:02:42Z","author_association":"NONE","body":"@joaogantunes @yanboliang I'm having same error! I'm on Keras 2.2 + TF 1.7\r\n```\r\n>> model.input.name\r\n'embedding_1_input_3:0'\r\n>> model.input.name = 'embd'\r\nAttributeError: can't set attribute\r\n```"}}
{"actor":{"display_login":"spate141"}}