broadcasting

No broadcasting for tf.matmul in TensorFlow

你说的曾经没有我的故事 提交于 2019-12-01 03:10:11
I have a problem with which I've been struggling. It is related to tf.matmul() and its absence of broadcasting. I am aware of a similar issue on https://github.com/tensorflow/tensorflow/issues/216 , but tf.batch_matmul() doesn't look like a solution for my case. I need to encode my input data as a 4D tensor: X = tf.placeholder(tf.float32, shape=(None, None, None, 100)) The first dimension is the size of a batch, the second the number of entries in the batch. You can imagine each entry as a composition of a number of objects (third dimension). Finally, each object is described by a vector of

Sending UDP broadcast, receiving multiple messages

限于喜欢 提交于 2019-11-27 06:27:36
I've got 2 programs, 1 for sending an UDP broadcast message and 1 that is listening for this broadcast. My problem is that sometimes when I send a broadcast, the receiver receives 2 messages. Why? Receiver code: public class Receiver { private readonly UdpClient udp = new UdpClient(15000); private void StartListening() { this.udp.BeginReceive(Receive, new object()); } private void Receive(IAsyncResult ar) { IPEndPoint ip = new IPEndPoint(IPAddress.Any, 15000); byte[] bytes = udp.EndReceive(ar, ref ip); string message = Encoding.ASCII.GetString(bytes); StartListening(); } } Sender code: public

Sending UDP broadcast, receiving multiple messages

你说的曾经没有我的故事 提交于 2019-11-26 12:00:37
问题 I\'ve got 2 programs, 1 for sending an UDP broadcast message and 1 that is listening for this broadcast. My problem is that sometimes when I send a broadcast, the receiver receives 2 messages. Why? Receiver code: public class Receiver { private readonly UdpClient udp = new UdpClient(15000); private void StartListening() { this.udp.BeginReceive(Receive, new object()); } private void Receive(IAsyncResult ar) { IPEndPoint ip = new IPEndPoint(IPAddress.Any, 15000); byte[] bytes = udp.EndReceive