computer-science

What does it mean to “break symmetry”? in the context of neural network programming? [duplicate]

限于喜欢 提交于 2021-02-07 14:24:22
问题 This question already has answers here : Why should weights of Neural Networks be initialized to random numbers? [closed] (9 answers) Closed last year . I have heard a lot about "breaking the symmetry" within the context of neural network programming and initialization. Can somebody please explain what this means? As far as I can tell, it has something to do with neurons performing similarly during forward and backward propagation if the weight matrix is filled with identical values during

Is C++ considered a Von Neumann programming language?

别等时光非礼了梦想. 提交于 2021-02-07 13:40:34
问题 The term Von Neumann languages is applied to programming languages whose computational model is based on the Von Neumann computer architecture. Is C++ considered a Von Neumann language, or if it's not (e.g., because of asynchronous execution with the advent of threads) was it ever considered a Von Neumann language? Is there an architecture that C++'s computational model/abstract machine is based on and thus can be classified as a language of that architecture? 回答1: TL:DR: The C++ abstract

Graphs: find a sink in less than O(|V|) - or show it can't be done

耗尽温柔 提交于 2021-02-05 18:57:44
问题 I have a graph with n nodes as an adjacency matrix . Is it possible to detect a sink in less than O(n) time? If yes, how? If no, how do we prove it? Sink vertex is a vertex that has incoming edges from other nodes and no outgoing edges. 回答1: Suppose to the contrary that there exists an algorithm that queries fewer than (n-2)/2 edges, and let the adversary answer these queries arbitrarily. By the Pigeonhole Principle, there exist (at least) two nodes v, w that are not an endpoint of any edge

Graphs: find a sink in less than O(|V|) - or show it can't be done

限于喜欢 提交于 2021-02-05 18:56:42
问题 I have a graph with n nodes as an adjacency matrix . Is it possible to detect a sink in less than O(n) time? If yes, how? If no, how do we prove it? Sink vertex is a vertex that has incoming edges from other nodes and no outgoing edges. 回答1: Suppose to the contrary that there exists an algorithm that queries fewer than (n-2)/2 edges, and let the adversary answer these queries arbitrarily. By the Pigeonhole Principle, there exist (at least) two nodes v, w that are not an endpoint of any edge

Memory Access using 32 bit address in a word-addressable system

。_饼干妹妹 提交于 2021-02-05 11:18:05
问题 I'm just checking to make sure I have a proper understanding of how memory access works. Say I have a word-addressable memory system with 64-bit words. How much memory could be accessed using a 32-bit address size? A 64 bit word is 8 bytes, so we're dealing with an 8 byte word. An 8 byte word can hold up to 2^8 (256). Given that we have a 32 bit address, we have 2^32, but since each word is taking up 256 of those, (2^32)/256 = 1677216 bytes. To put that into metric terms, we have 2^24 = (2^4)

How to compute cache bit widths for tags, indices and offsets in a set-associative cache and TLB

旧城冷巷雨未停 提交于 2021-02-04 21:08:05
问题 Following is the question: We have memory system with both virtual of 64-bits and physical address of 48-bits. The L1 TLB is fully associative with 64 entries. The page size in virtual memory is 16KB. L1 cache is of 32KB and 2-way set associative, L2 cache is of 2MB and 4-way set associative. Block size of both L1 and L2 cache is 64B. L1 cache is using virtually indexed physically tagged (VIPT) scheme. We are required to compute tags, indices and offsets. This is the solution that I have

How does the system choose the right Page Table?

大憨熊 提交于 2021-02-04 10:30:08
问题 Let's focus on uniprocessor computer systems. When a process gets created, as far as I know, the page table gets set up which maps the virtual addresses to the physical memory address space. Each process gets its own page table, stored in the kernel address space. But how does the MMU choose the right page table for the process since there is not only one process running and there will be many context switches happening? Any help is appreciated! Best, Simon 回答1: Processors have a privileged

Some questions related to cache performance (computer architecture)

孤街醉人 提交于 2021-02-04 08:28:45
问题 Details about the X5650 processor at https://www.cpu-world.com/CPUs/Xeon/Intel-Xeon%20X5650%20-%20AT80614004320AD%20(BX80614X5650).html important notes: L3 cache size : 12288KB cache line size : 64 Consider the following two functions, which each increment the values in an array by 100. void incrementVector1(INT4* v, int n) { for (int k = 0; k < 100; ++k) { for (int i = 0; i < n; ++i) { v[i] = v[i] + 1; } } } void incrementVector2(INT4* v, int n) { for (int i = 0; i < n; ++i) { for (int k = 0

Negative speed up in Amdahl's law?

删除回忆录丶 提交于 2021-02-02 09:07:51
问题 Amdahl’s law states that a speed up of the entire system is an_old_time / a_new_time where the a_new_time can be represented as ( 1 - f ) + f / s’ , where f is the fraction of the system that is enhanced by some modification, and s’ is the amount by which that fraction of the system is enhanced. However, after solving this equation for s’ , it seems like there are many cases in which s’ is negative, which makes no physical sense. Taking the case that s = 2 (a 100% increase in the speed for

What is the best method to sort a dynamic array of c-strings in a class in c++?

霸气de小男生 提交于 2021-01-29 14:45:30
问题 In my current programming class I've been tasked with creating a program that takes user input course (Consisting of course name, course grade, course units variables) and storing them in a dynamically generated array with a maximum size of 10. Due to my unfamiliarity with object oriented programming and classes however I'm finding anything beyond the pure creation of the classes to be very difficult. I've figured out a way to create the entries, as well as how to edit them after they've been