{"action":"created","issue":{"url":"https://api.github.com/repos/davisking/dlib/issues/565","repository_url":"https://api.github.com/repos/davisking/dlib","labels_url":"https://api.github.com/repos/davisking/dlib/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/davisking/dlib/issues/565/comments","events_url":"https://api.github.com/repos/davisking/dlib/issues/565/events","html_url":"https://github.com/davisking/dlib/issues/565","id":225295034,"number":565,"title":"Copy only one sample from the tensor","user":{"login":"don-prog","id":6806786,"avatar_url":"https://avatars3.githubusercontent.com/u/6806786?v=3","gravatar_id":"","url":"https://api.github.com/users/don-prog","html_url":"https://github.com/don-prog","followers_url":"https://api.github.com/users/don-prog/followers","following_url":"https://api.github.com/users/don-prog/following{/other_user}","gists_url":"https://api.github.com/users/don-prog/gists{/gist_id}","starred_url":"https://api.github.com/users/don-prog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/don-prog/subscriptions","organizations_url":"https://api.github.com/users/don-prog/orgs","repos_url":"https://api.github.com/users/don-prog/repos","events_url":"https://api.github.com/users/don-prog/events{/privacy}","received_events_url":"https://api.github.com/users/don-prog/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-04-30T00:35:23Z","updated_at":"2017-05-02T03:49:13Z","closed_at":"2017-04-30T01:16:07Z","body":"I'm trying to use dlib framework to define my own loss layer. \r\nIn this loss layer I get a few samples in the output_tensor. Next my loss function should e.g. add vector of the first sample to the vector of the third sample, but I can't do this, because I can't get certain sample separately from other using tensor_tools - tensor_tools::copy_tensor() copies **each sample** to the dest tensor. \r\n\r\n**So how can I extract only one sample from the tensor using dlib's tools?**"},"comment":{"url":"https://api.github.com/repos/davisking/dlib/issues/comments/298490957","html_url":"https://github.com/davisking/dlib/issues/565#issuecomment-298490957","issue_url":"https://api.github.com/repos/davisking/dlib/issues/565","id":298490957,"user":{"login":"don-prog","id":6806786,"avatar_url":"https://avatars3.githubusercontent.com/u/6806786?v=3","gravatar_id":"","url":"https://api.github.com/users/don-prog","html_url":"https://github.com/don-prog","followers_url":"https://api.github.com/users/don-prog/followers","following_url":"https://api.github.com/users/don-prog/following{/other_user}","gists_url":"https://api.github.com/users/don-prog/gists{/gist_id}","starred_url":"https://api.github.com/users/don-prog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/don-prog/subscriptions","organizations_url":"https://api.github.com/users/don-prog/orgs","repos_url":"https://api.github.com/users/don-prog/repos","events_url":"https://api.github.com/users/don-prog/events{/privacy}","received_events_url":"https://api.github.com/users/don-prog/received_events","type":"User","site_admin":false},"created_at":"2017-05-02T03:49:13Z","updated_at":"2017-05-02T03:49:13Z","body":"@davisking indeed! alias_tensor works, thanks! I don't want create one more thread in your repo for this small question, so I ask here, if you don't mind:\r\nIf I will change class of loss to my custom class and number of output neurons to my custom value in the training and testing definitions of the network, is this enough for using my custom loss with custom number of output neurons? Example:\r\nusing net_type = **my_loss**<fc_no_bias<**6**,avg_pool_everything<...>>>\r\n\r\nOr I need to change some other settings? \r\nRegards!"}}
{"actor":{"display_login":"don-prog"}}