text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```kotlin package id.zelory.compressor.constraint import android.graphics.Bitmap import id.zelory.compressor.compressFormat import id.zelory.compressor.loadBitmap import id.zelory.compressor.overWrite import java.io.File /** * Created on : January 24, 2020 * Author : zetbaitsu * Name : Zetra * GitHub : path_to_url */ class FormatConstraint(private val format: Bitmap.CompressFormat) : Constraint { override fun isSatisfied(imageFile: File): Boolean { return format == imageFile.compressFormat() } override fun satisfy(imageFile: File): File { return overWrite(imageFile, loadBitmap(imageFile), format) } } fun Compression.format(format: Bitmap.CompressFormat) { constraint(FormatConstraint(format)) } ```
/content/code_sandbox/compressor/src/main/java/id/zelory/compressor/constraint/FormatConstraint.kt
kotlin
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
175
```kotlin package id.zelory.compressor.constraint import java.io.File /** * Created on : January 25, 2020 * Author : zetbaitsu * Name : Zetra * GitHub : path_to_url */ class DestinationConstraint(private val destination: File) : Constraint { override fun isSatisfied(imageFile: File): Boolean { return imageFile.absolutePath == destination.absolutePath } override fun satisfy(imageFile: File): File { return imageFile.copyTo(destination, true) } } fun Compression.destination(destination: File) { constraint(DestinationConstraint(destination)) } ```
/content/code_sandbox/compressor/src/main/java/id/zelory/compressor/constraint/DestinationConstraint.kt
kotlin
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
132
```qmake # Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in /Users/macbookair/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # path_to_url # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} ```
/content/code_sandbox/app/proguard-rules.pro
qmake
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
141
```kotlin package id.zelory.compressor.constraint import android.graphics.Bitmap import id.zelory.compressor.decodeSampledBitmapFromFile import id.zelory.compressor.determineImageRotation import id.zelory.compressor.overWrite import java.io.File /** * Created on : January 25, 2020 * Author : zetbaitsu * Name : Zetra * GitHub : path_to_url */ class DefaultConstraint( private val width: Int = 612, private val height: Int = 816, private val format: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, private val quality: Int = 80 ) : Constraint { private var isResolved = false override fun isSatisfied(imageFile: File): Boolean { return isResolved } override fun satisfy(imageFile: File): File { val result = decodeSampledBitmapFromFile(imageFile, width, height).run { determineImageRotation(imageFile, this).run { overWrite(imageFile, this, format, quality) } } isResolved = true return result } } fun Compression.default( width: Int = 612, height: Int = 816, format: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, quality: Int = 80 ) { constraint(DefaultConstraint(width, height, format, quality)) } ```
/content/code_sandbox/compressor/src/main/java/id/zelory/compressor/constraint/DefaultConstraint.kt
kotlin
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
304
```xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="path_to_url" xmlns:tools="path_to_url" package="id.zelory.compressor.sample"> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> ```
/content/code_sandbox/app/src/main/AndroidManifest.xml
xml
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
191
```xml <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources> ```
/content/code_sandbox/app/src/main/res/values/styles.xml
xml
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
87
```xml <resources> <string name="app_name">Compressor</string> </resources> ```
/content/code_sandbox/app/src/main/res/values/strings.xml
xml
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
20
```xml <resources> <!-- Default screen margins, per the Android Design guidelines. --> <dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_vertical_margin">16dp</dimen> </resources> ```
/content/code_sandbox/app/src/main/res/values/dimens.xml
xml
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
52
```xml <?xml version="1.0" encoding="utf-8"?> <resources> <color name="colorPrimary">#3F51B5</color> <color name="colorPrimaryDark">#303F9F</color> <color name="colorAccent">#FF4081</color> </resources> ```
/content/code_sandbox/app/src/main/res/values/colors.xml
xml
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
67
```xml <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <ImageView android:id="@+id/actualImageView" android:layout_width="0dp" android:layout_height="240dp" android:layout_marginEnd="4dp" android:layout_marginRight="4dp" android:layout_weight="1" android:adjustViewBounds="true"/> <ImageView android:id="@+id/compressedImageView" android:layout_width="0dp" android:layout_height="240dp" android:layout_marginLeft="4dp" android:layout_marginStart="4dp" android:layout_weight="1" android:adjustViewBounds="true"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="4dp" android:orientation="horizontal"> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginEnd="4dp" android:layout_marginRight="4dp" android:layout_weight="1" android:gravity="center" android:text="Actual Image" android:textSize="12sp"/> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="4dp" android:layout_marginStart="4dp" android:layout_weight="1" android:gravity="center" android:text="Compressed Image" android:textSize="12sp"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="2dp" android:orientation="horizontal"> <TextView android:id="@+id/actualSizeTextView" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginEnd="4dp" android:layout_marginRight="4dp" android:layout_weight="1" android:gravity="center" android:text="Size : -" android:textSize="12sp"/> <TextView android:id="@+id/compressedSizeTextView" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="4dp" android:layout_marginStart="4dp" android:layout_weight="1" android:gravity="center" android:text="Size : -" android:textSize="12sp"/> </LinearLayout> <Button android:id="@+id/chooseImageButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Choose image"/> <Button android:id="@+id/compressImageButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Compress image"/> <Button android:id="@+id/customCompressImageButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Custom compress"/> </LinearLayout> </ScrollView> ```
/content/code_sandbox/app/src/main/res/layout/activity_main.xml
xml
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
864
```xml <resources> <!-- Example customization of dimensions originally defined in res/values/dimens.xml (such as screen margins) for screens with more than 820dp of available width. This would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> <dimen name="activity_horizontal_margin">64dp</dimen> </resources> ```
/content/code_sandbox/app/src/main/res/values-w820dp/dimens.xml
xml
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
83
```java package id.zelory.compressor.sample; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.provider.OpenableColumns; import android.util.Log; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; /** * Created on : June 18, 2016 * Author : zetbaitsu * Name : Zetra * GitHub : path_to_url */ class FileUtil { private static final int EOF = -1; private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; private FileUtil() { } public static File from(Context context, Uri uri) throws IOException { InputStream inputStream = context.getContentResolver().openInputStream(uri); String fileName = getFileName(context, uri); String[] splitName = splitFileName(fileName); File tempFile = File.createTempFile(splitName[0], splitName[1]); tempFile = rename(tempFile, fileName); tempFile.deleteOnExit(); FileOutputStream out = null; try { out = new FileOutputStream(tempFile); } catch (FileNotFoundException e) { e.printStackTrace(); } if (inputStream != null) { copy(inputStream, out); inputStream.close(); } if (out != null) { out.close(); } return tempFile; } private static String[] splitFileName(String fileName) { String name = fileName; String extension = ""; int i = fileName.lastIndexOf("."); if (i != -1) { name = fileName.substring(0, i); extension = fileName.substring(i); } return new String[]{name, extension}; } private static String getFileName(Context context, Uri uri) { String result = null; if (uri.getScheme().equals("content")) { Cursor cursor = context.getContentResolver().query(uri, null, null, null, null); try { if (cursor != null && cursor.moveToFirst()) { result = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); } } catch (Exception e) { e.printStackTrace(); } finally { if (cursor != null) { cursor.close(); } } } if (result == null) { result = uri.getPath(); int cut = result.lastIndexOf(File.separator); if (cut != -1) { result = result.substring(cut + 1); } } return result; } private static File rename(File file, String newName) { File newFile = new File(file.getParent(), newName); if (!newFile.equals(file)) { if (newFile.exists() && newFile.delete()) { Log.d("FileUtil", "Delete old " + newName + " file"); } if (file.renameTo(newFile)) { Log.d("FileUtil", "Rename file to " + newName); } } return newFile; } private static long copy(InputStream input, OutputStream output) throws IOException { long count = 0; int n; byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; while (EOF != (n = input.read(buffer))) { output.write(buffer, 0, n); count += n; } return count; } } ```
/content/code_sandbox/app/src/main/java/id/zelory/compressor/sample/FileUtil.java
java
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
710
```kotlin package id.zelory.compressor.sample import android.content.Intent import android.graphics.Bitmap import android.graphics.BitmapFactory import android.graphics.Color import android.os.Bundle import android.os.Environment import android.util.Log import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.lifecycle.lifecycleScope import id.zelory.compressor.Compressor import id.zelory.compressor.constraint.default import id.zelory.compressor.constraint.destination import id.zelory.compressor.constraint.format import id.zelory.compressor.constraint.quality import id.zelory.compressor.constraint.resolution import id.zelory.compressor.constraint.size import id.zelory.compressor.loadBitmap import kotlinx.android.synthetic.main.activity_main.actualImageView import kotlinx.android.synthetic.main.activity_main.actualSizeTextView import kotlinx.android.synthetic.main.activity_main.chooseImageButton import kotlinx.android.synthetic.main.activity_main.compressImageButton import kotlinx.android.synthetic.main.activity_main.compressedImageView import kotlinx.android.synthetic.main.activity_main.compressedSizeTextView import kotlinx.android.synthetic.main.activity_main.customCompressImageButton import kotlinx.coroutines.launch import java.io.File import java.io.IOException import java.text.DecimalFormat import java.util.* import kotlin.math.log10 import kotlin.math.pow /** * Created on : January 25, 2020 * Author : zetbaitsu * Name : Zetra * GitHub : path_to_url */ class MainActivity : AppCompatActivity() { companion object { private const val PICK_IMAGE_REQUEST = 1 } private var actualImage: File? = null private var compressedImage: File? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) actualImageView.setBackgroundColor(getRandomColor()) clearImage() setupClickListener() } private fun setupClickListener() { chooseImageButton.setOnClickListener { chooseImage() } compressImageButton.setOnClickListener { compressImage() } customCompressImageButton.setOnClickListener { customCompressImage() } } private fun chooseImage() { val intent = Intent(Intent.ACTION_GET_CONTENT) intent.type = "image/*" startActivityForResult(intent, PICK_IMAGE_REQUEST) } private fun compressImage() { actualImage?.let { imageFile -> lifecycleScope.launch { // Default compression compressedImage = Compressor.compress(this@MainActivity, imageFile) setCompressedImage() } } ?: showError("Please choose an image!") } private fun customCompressImage() { actualImage?.let { imageFile -> lifecycleScope.launch { // Default compression with custom destination file /*compressedImage = Compressor.compress(this@MainActivity, imageFile) { default() getExternalFilesDir(Environment.DIRECTORY_PICTURES)?.also { val file = File("${it.absolutePath}${File.separator}my_image.${imageFile.extension}") destination(file) } }*/ // Full custom compressedImage = Compressor.compress(this@MainActivity, imageFile) { resolution(1280, 720) quality(80) format(Bitmap.CompressFormat.WEBP) size(2_097_152) // 2 MB } setCompressedImage() } } ?: showError("Please choose an image!") } private fun setCompressedImage() { compressedImage?.let { compressedImageView.setImageBitmap(BitmapFactory.decodeFile(it.absolutePath)) compressedSizeTextView.text = String.format("Size : %s", getReadableFileSize(it.length())) Toast.makeText(this, "Compressed image save in " + it.path, Toast.LENGTH_LONG).show() Log.d("Compressor", "Compressed image save in " + it.path) } } private fun clearImage() { actualImageView.setBackgroundColor(getRandomColor()) compressedImageView.setImageDrawable(null) compressedImageView.setBackgroundColor(getRandomColor()) compressedSizeTextView.text = "Size : -" } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK) { if (data == null) { showError("Failed to open picture!") return } try { actualImage = FileUtil.from(this, data.data)?.also { actualImageView.setImageBitmap(loadBitmap(it)) actualSizeTextView.text = String.format("Size : %s", getReadableFileSize(it.length())) clearImage() } } catch (e: IOException) { showError("Failed to read picture data!") e.printStackTrace() } } } private fun showError(errorMessage: String) { Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT).show() } private fun getRandomColor() = Random().run { Color.argb(100, nextInt(256), nextInt(256), nextInt(256)) } private fun getReadableFileSize(size: Long): String { if (size <= 0) { return "0" } val units = arrayOf("B", "KB", "MB", "GB", "TB") val digitGroups = (log10(size.toDouble()) / log10(1024.0)).toInt() return DecimalFormat("#,##0.#").format(size / 1024.0.pow(digitGroups.toDouble())) + " " + units[digitGroups] } } ```
/content/code_sandbox/app/src/main/java/id/zelory/compressor/sample/MainActivity.kt
kotlin
2016-06-18T13:54:59
2024-08-16T08:02:02
Compressor
zetbaitsu/Compressor
7,034
1,126
```desktop [Desktop Entry] Type=Application Name=Buckle Comment=Bucklespring keyboard sound Exec=buckle -f Icon=input-keyboard StartupNotify=false Terminal=false Hidden=false ```
/content/code_sandbox/buckle.desktop
desktop
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
41
```c #include <windows.h> #include <winuser.h> #include <stdio.h> #include <io.h> #include <fcntl.h> #include "buckle.h" void open_console(); LRESULT CALLBACK handle_kbh(int nCode, WPARAM wParam, LPARAM lParam); static HHOOK kbh = NULL; static int state[256] = { 0 }; int scan(int verbose) { HINSTANCE hInst = GetModuleHandle(NULL); kbh = SetWindowsHookEx(WH_KEYBOARD_LL, handle_kbh, hInst, 0); MSG msg; while(GetMessage(&msg, (HWND) NULL, 0, 0) > 0) { TranslateMessage(&msg); DispatchMessage(&msg); } return 0; } LRESULT CALLBACK handle_kbh(int nCode, WPARAM wParam, LPARAM lParam) { KBDLLHOOKSTRUCT *ev = (KBDLLHOOKSTRUCT *)lParam; printd("vkCode=%d scanCode=%d flags=%d time=%d", (int)ev->vkCode, (int)ev->scanCode, (int)ev->flags, (int)ev->time); int updown = (wParam == WM_KEYDOWN || wParam == WM_SYSKEYDOWN); int code = ev->scanCode; if(code < 256) { if(state[code] != updown) { play(code, updown); state[code] = updown; } } return CallNextHookEx(kbh, nCode, wParam, lParam); } void open_console() { int hConHandle; INT_PTR lStdHandle; CONSOLE_SCREEN_BUFFER_INFO coninfo; FILE *fp; AllocConsole(); GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo); coninfo.dwSize.Y = 500; SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize); lStdHandle = (INT_PTR)GetStdHandle(STD_OUTPUT_HANDLE); hConHandle = _open_osfhandle(lStdHandle, _O_TEXT); fp = _fdopen( hConHandle, "w" ); *stdout = *fp; *stderr = *fp; setvbuf(fp, NULL, _IONBF, 0 ); } ```
/content/code_sandbox/scan-windows.c
c
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
471
```objective-c #ifndef buckle_h #define buckle_h int play(int code, int press); int scan(int verbose); void printd(const char *fmt, ...); void open_console(void); #endif ```
/content/code_sandbox/buckle.h
objective-c
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
39
```c #include <ApplicationServices/ApplicationServices.h> #include "buckle.h" /* * From path_to_url */ static const int mactoset1[] = { /* set-1 SDL_QuartzKeys.h */ 0x1e, /* QZ_a 0x00 */ 0x1f, /* QZ_s 0x01 */ 0x20, /* QZ_d 0x02 */ 0x21, /* QZ_f 0x03 */ 0x23, /* QZ_h 0x04 */ 0x22, /* QZ_g 0x05 */ 0x2c, /* QZ_z 0x06 */ 0x2d, /* QZ_x 0x07 */ 0x2e, /* QZ_c 0x08 */ 0x2f, /* QZ_v 0x09 */ 0x56, /* between lshift and z. 'INT 1'? */ 0x30, /* QZ_b 0x0B */ 0x10, /* QZ_q 0x0C */ 0x11, /* QZ_w 0x0D */ 0x12, /* QZ_e 0x0E */ 0x13, /* QZ_r 0x0F */ 0x15, /* QZ_y 0x10 */ 0x14, /* QZ_t 0x11 */ 0x02, /* QZ_1 0x12 */ 0x03, /* QZ_2 0x13 */ 0x04, /* QZ_3 0x14 */ 0x05, /* QZ_4 0x15 */ 0x07, /* QZ_6 0x16 */ 0x06, /* QZ_5 0x17 */ 0x0d, /* QZ_EQUALS 0x18 */ 0x0a, /* QZ_9 0x19 */ 0x08, /* QZ_7 0x1A */ 0x0c, /* QZ_MINUS 0x1B */ 0x09, /* QZ_8 0x1C */ 0x0b, /* QZ_0 0x1D */ 0x1b, /* QZ_RIGHTBRACKET 0x1E */ 0x18, /* QZ_o 0x1F */ 0x16, /* QZ_u 0x20 */ 0x1a, /* QZ_LEFTBRACKET 0x21 */ 0x17, /* QZ_i 0x22 */ 0x19, /* QZ_p 0x23 */ 0x1c, /* QZ_RETURN 0x24 */ 0x26, /* QZ_l 0x25 */ 0x24, /* QZ_j 0x26 */ 0x28, /* QZ_QUOTE 0x27 */ 0x25, /* QZ_k 0x28 */ 0x27, /* QZ_SEMICOLON 0x29 */ 0x2b, /* QZ_BACKSLASH 0x2A */ 0x33, /* QZ_COMMA 0x2B */ 0x35, /* QZ_SLASH 0x2C */ 0x31, /* QZ_n 0x2D */ 0x32, /* QZ_m 0x2E */ 0x34, /* QZ_PERIOD 0x2F */ 0x0f, /* QZ_TAB 0x30 */ 0x39, /* QZ_SPACE 0x31 */ 0x29, /* QZ_BACKQUOTE 0x32 */ 0x0e, /* QZ_BACKSPACE 0x33 */ 0x9c, /* QZ_IBOOK_ENTER 0x34 */ 0x01, /* QZ_ESCAPE 0x35 */ 0x5c, /* QZ_RMETA 0x36 */ 0x5b, /* QZ_LMETA 0x37 */ 0x2a, /* QZ_LSHIFT 0x38 */ 0x3a, /* QZ_CAPSLOCK 0x39 */ 0x38, /* QZ_LALT 0x3A */ 0x1d, /* QZ_LCTRL 0x3B */ 0x36, /* QZ_RSHIFT 0x3C */ 0x38, /* QZ_RALT 0x3D */ 0x1d, /* QZ_RCTRL 0x3E */ 0, /* */ 0, /* */ 0x53, /* QZ_KP_PERIOD 0x41 */ 0, /* */ 0x37, /* QZ_KP_MULTIPLY 0x43 */ 0, /* */ 0x4e, /* QZ_KP_PLUS 0x45 */ 0, /* */ 0x45, /* QZ_NUMLOCK 0x47 */ 0, /* */ 0, /* */ 0, /* */ 0x35, /* QZ_KP_DIVIDE 0x4B */ 0x1c, /* QZ_KP_ENTER 0x4C */ 0, /* */ 0x4a, /* QZ_KP_MINUS 0x4E */ 0, /* */ 0, /* */ 0x0d/*?*/, /* QZ_KP_EQUALS 0x51 */ 0x52, /* QZ_KP0 0x52 */ 0x4f, /* QZ_KP1 0x53 */ 0x50, /* QZ_KP2 0x54 */ 0x51, /* QZ_KP3 0x55 */ 0x4b, /* QZ_KP4 0x56 */ 0x4c, /* QZ_KP5 0x57 */ 0x4d, /* QZ_KP6 0x58 */ 0x47, /* QZ_KP7 0x59 */ 0, /* */ 0x48, /* QZ_KP8 0x5B */ 0x49, /* QZ_KP9 0x5C */ 0x7d, /* yen, | (JIS) 0x5D */ 0x73, /* _, ro (JIS) 0x5E */ 0, /* */ 0x3f, /* QZ_F5 0x60 */ 0x40, /* QZ_F6 0x61 */ 0x41, /* QZ_F7 0x62 */ 0x3d, /* QZ_F3 0x63 */ 0x42, /* QZ_F8 0x64 */ 0x43, /* QZ_F9 0x65 */ 0x29, /* Zen/Han (JIS) 0x66 */ 0x57, /* QZ_F11 0x67 */ 0x29, /* Zen/Han (JIS) 0x68 */ 0x37, /* QZ_PRINT / F13 0x69 */ 0x63, /* QZ_F16 0x6A */ 0x46, /* QZ_SCROLLOCK 0x6B */ 0, /* */ 0x44, /* QZ_F10 0x6D */ 0x5d, /* */ 0x58, /* QZ_F12 0x6F */ 0, /* */ 0/* 0xe1,0x1d,0x45*/, /* QZ_PAUSE 0x71 */ 0x52, /* QZ_INSERT / HELP 0x72 */ 0x47, /* QZ_HOME 0x73 */ 0x49, /* QZ_PAGEUP 0x74 */ 0x53, /* QZ_DELETE 0x75 */ 0x3e, /* QZ_F4 0x76 */ 0x4f, /* QZ_END 0x77 */ 0x3c, /* QZ_F2 0x78 */ 0x51, /* QZ_PAGEDOWN 0x79 */ 0x3b, /* QZ_F1 0x7A */ 0x4b, /* QZ_LEFT 0x7B */ 0x4d, /* QZ_RIGHT 0x7C */ 0x50, /* QZ_DOWN 0x7D */ 0x48, /* QZ_UP 0x7E */ 0,/*0x5e|K_EX*/ /* QZ_POWER 0x7F */ /* have different break key! */ /* do NEVER deliver the Power * scancode as e.g. Windows will * handle it, @bugref{7692}. */ }; /* * Adapted from path_to_url */ CGEventRef myCGEventCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) { if ((type != kCGEventKeyDown) && (type != kCGEventKeyUp)) return event; int mackeycode = (int)CGEventGetIntegerValueField(event, kCGKeyboardEventKeycode); printd("Mac keycode: %d", mackeycode); if (mackeycode >= sizeof(mactoset1)/sizeof(mactoset1[0])) return event; int key = mactoset1[mackeycode]; if (CGEventGetIntegerValueField(event, kCGKeyboardEventAutorepeat)) return event; switch (type) { case kCGEventKeyDown: play(key, 1); break; case kCGEventKeyUp: play(key, 0); break; default: break; } return event; } int scan(int verbose) { CFMachPortRef eventTap; CGEventMask eventMask; CFRunLoopSourceRef runLoopSource; /* Create an event tap. We are interested in key presses. */ eventMask = ((1 << kCGEventKeyDown) | (1 << kCGEventKeyUp)); eventTap = CGEventTapCreate(kCGSessionEventTap, kCGHeadInsertEventTap, 0, eventMask, myCGEventCallback, NULL); if (!eventTap) { fprintf(stderr, "failed to create event tap\n"); exit(1); } /* Create a run loop source. */ runLoopSource = CFMachPortCreateRunLoopSource( kCFAllocatorDefault, eventTap, 0); /* Add to the current run loop. */ CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopCommonModes); /* Enable the event tap. */ CGEventTapEnable(eventTap, true); /* Set it all running. */ CFRunLoopRun(); return 0; } void open_console(void) { } ```
/content/code_sandbox/scan-mac.c
c
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
2,630
```c #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/poll.h> #include <string.h> #include <errno.h> #include <libinput.h> #include "buckle.h" static int open_restricted(const char *path, int flags, void *user_data) { int fd = open(path, flags); if(fd < 0) { fprintf(stderr, "Failed to open %s (%s)\n", path, strerror(errno)); } return fd < 0 ? -errno : fd; } static void close_restricted(int fd, void *user_data) { close(fd); } static const struct libinput_interface interface = { .open_restricted = open_restricted, .close_restricted = close_restricted, }; static void handle_key(struct libinput_event *ev) { struct libinput_event_keyboard *k = libinput_event_get_keyboard_event(ev); enum libinput_key_state state = libinput_event_keyboard_get_key_state(k); uint32_t key = libinput_event_keyboard_get_key(k); play(key, state == LIBINPUT_KEY_STATE_PRESSED); } static void handle_events(struct libinput *li) { struct libinput_event *ev; libinput_dispatch(li); while((ev = libinput_get_event(li))) { switch(libinput_event_get_type(ev)) { case LIBINPUT_EVENT_KEYBOARD_KEY: handle_key(ev); break; default: break; } libinput_event_destroy(ev); libinput_dispatch(li); } } static void log_handler(struct libinput *li, enum libinput_log_priority priority, const char *format, va_list args) { vprintf(format, args); } int scan(int verbose) { struct udev *udev; struct libinput *li; udev = udev_new(); if (!udev) { fprintf(stderr, "Failed to initialize udev\n"); return -1; } li = libinput_udev_create_context(&interface, NULL, udev); if(!li) { fprintf(stderr, "Failed to initialize context\n"); return -1; } if(verbose) { libinput_log_set_handler(li, log_handler); libinput_log_set_priority(li, LIBINPUT_LOG_PRIORITY_DEBUG); } if (libinput_udev_assign_seat(li, "seat0")) { fprintf(stderr, "Failed to set seat\n"); return -1; } libinput_dispatch(li); struct pollfd fds; fds.fd = libinput_get_fd(li); fds.events = POLLIN; fds.revents = 0; while(poll(&fds, 1, -1) > -1) { handle_events(li); } return 0; } void open_console(void) { } ```
/content/code_sandbox/scan-libinput.c
c
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
576
```unknown NAME := buckle SRC := main.c VERSION := 1.5.1 PATH_AUDIO ?= "./wav" CFLAGS ?= -O3 -g LDFLAGS ?= -g CFLAGS += -Wall -Werror CFLAGS += -DVERSION=\"$(VERSION)\" CFLAGS += -DPATH_AUDIO=\"$(PATH_AUDIO)\" ifdef mingw BIN := $(NAME).exe CROSS := i686-w64-mingw32- CFLAGS += -Iwin32/include -Iwin32/include/AL LDFLAGS += -mwindows -static-libgcc -static-libstdc++ LIBS += -Lwin32/lib -lALURE32 -lOpenAL32 SRC += scan-windows.c else OS := $(shell uname) ifeq ($(OS), Darwin) BIN := $(NAME) PKG_CONFIG_PATH := "./mac/lib/pkgconfig" LIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs alure openal) CFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags alure openal) LDFLAGS += -framework ApplicationServices -framework OpenAL SRC += scan-mac.c else BIN := $(NAME) ifdef libinput LIBS += $(shell pkg-config --libs openal alure libinput libudev) CFLAGS += $(shell pkg-config --cflags openal alure libinput libudev) SRC += scan-libinput.c else LIBS += $(shell pkg-config --libs openal alure xtst x11) CFLAGS += $(shell pkg-config --cflags openal alure xtst x11) SRC += scan-x11.c endif endif endif OBJS = $(subst .c,.o, $(SRC)) CC ?= $(CROSS)gcc LD ?= $(CROSS)gcc CCLD ?= $(CC) STRIP = $(CROSS)strip %.o: %.c $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ $(BIN): $(OBJS) $(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) dist: mkdir -p $(NAME)-$(VERSION) cp -a *.c *.h wav Makefile LICENSE $(NAME)-$(VERSION) tar -zcf /tmp/$(NAME)-$(VERSION).tgz $(NAME)-$(VERSION) rm -rf $(NAME)-$(VERSION) rec: rec.c gcc -Wall -Werror rec.c -o rec clean: $(RM) $(OBJS) $(BIN) core rec strip: $(BIN) $(STRIP) $(BIN) ```
/content/code_sandbox/Makefile
unknown
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
625
```c #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/select.h> #include <sys/time.h> struct input_event { struct timeval time; unsigned short type; unsigned short code; unsigned int value; }; #define HISTSIZE 60 int main(int argc, char **argv) { struct input_event event; char cmd[256]; char fname[256]; FILE *f; int fd_ev, fd_snd; int samples = 0; int triggered = 0; FILE *fout = NULL; int head = 0; int16_t hist[HISTSIZE]; if(argc < 2) { fprintf(stderr, "usage: %s </dev/input/event#>\n", argv[0]); exit(1); } //f = popen("arecord -D plughw:1,0 -f cd -r 44100 -c 1", "r"); f = popen("parec --rate=44100 --format=s16le --channels=1", "r"); fd_snd = fileno(f); fd_ev = open(argv[1], O_RDONLY); if(fd_ev == -1) { perror("Could not open event input"); exit(1); } fd_set fds; while(1) { FD_ZERO(&fds); FD_SET(fd_ev, &fds); FD_SET(fd_snd, &fds); select(16, &fds, NULL, NULL, NULL); if(FD_ISSET(fd_ev, &fds)) { read(fd_ev, &event, sizeof event); if(event.type != 1) continue; if(event.value == 2) continue; if(triggered == 0) { snprintf(fname, sizeof fname, "wav-new/%02x-%d.wav", event.code, event.value); snprintf(cmd, sizeof cmd, "sox -qq -r 44100 -e signed -b 16 -c 1 -t raw - %s", fname); printf("%02x %d: ", event.code, event.value); fflush(stdout); fout = popen(cmd, "w"); samples = 0; triggered = 1; printf("%02x %d ", event.code, event.value); fflush(stdout); } } if(FD_ISSET(fd_snd, &fds)) { int16_t buf; read(fd_snd, &buf, sizeof buf); if(triggered) { if(samples == 0) { if(buf < -2000 || buf > 2000) { samples = 1; printf(">"); fflush(stdout); } } if(fout && samples) { fwrite(&hist[head], 1, sizeof hist[head], fout); if(samples > 44000/3) { fclose(fout); snprintf(cmd, sizeof(cmd), "paplay %s &", fname); system(cmd); printf(".\n"); fout = NULL; triggered = 0; } } if(samples) samples ++; } hist[head] = buf; head = (head + 1) % HISTSIZE; } } return 0; } ```
/content/code_sandbox/rec.c
c
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
704
```c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <errno.h> #include <stdint.h> #include <inttypes.h> #include <unistd.h> #include <limits.h> #include <stdbool.h> #include <getopt.h> #include <time.h> #ifdef __APPLE__ #include <OpenAL/al.h> #include <OpenAL/alure.h> #else #include <AL/al.h> #include <AL/alure.h> #endif #include "buckle.h" #define SRC_INVALID INT_MAX #define DEFAULT_MUTE_KEYCODE 0x46 /* Scroll Lock */ #define TEST_ERROR(_msg) \ error = alGetError(); \ if (error != AL_NO_ERROR) { \ fprintf(stderr, _msg "\n"); \ exit(1); \ } static void usage(char *exe); static void list_devices(void); static double find_key_loc(int code); /* * Horizontal position on keyboard for each key as they are located on my model-M */ static int keyloc[][32] = { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x66, 0x68, 0x1c, 0x45, 0x62, 0x37, 0x4a, -1 }, { 0x01, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x57, 0x58, 0x6f, 0x6b, 0x6d, 0x47, 0x48, 0x49, 0x4e, -1 }, { 0x29, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x4b, 0x4c, 0x4d, -1 }, { 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x2b, 0x4f, 0x50, 0x51, 0x60, -1 }, { 0x3a, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x1c, 0x52, 0x53, -1 }, { 0x2a, 0x56, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, -1 }, { 0x1d, 0x7d, 0x5b, 0x38, 0x39, 0x64, 0x61, 0x67, -1 }, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x6c, 0x6a, -1 }, }; /* * Horizontal position on keyboard of the pragmatic center of the row, since keys come in different sizes and shapes */ static double midloc[] = { 7.5, 7.5, 7.5, 6.5, 6.5, 6.5, 4.5, }; static int opt_verbose = 0; static int opt_no_click = 0; static int opt_stereo_width = 50; static int opt_gain = 100; static int opt_fallback_sound = 0; static int opt_mute_keycode = DEFAULT_MUTE_KEYCODE; static const char *opt_device = NULL; static const char *opt_path_audio = PATH_AUDIO; static int muted = 0; static const char short_opts[] = "d:fg:hlm:Mp:s:cv"; static const struct option long_opts[] = { { "device", required_argument, NULL, 'd' }, { "fallback-sound", no_argument, NULL, 'f' }, { "gain", required_argument, NULL, 'g' }, { "help", no_argument, NULL, 'h' }, { "list-devices", no_argument, NULL, 'l' }, { "mute-keycode", required_argument, NULL, 'm' }, { "mute", no_argument, NULL, 'M' }, { "audio-path", required_argument, NULL, 'p' }, { "stereo-width", required_argument, NULL, 's' }, { "no-click", no_argument, NULL, 'c' }, { "verbose", no_argument, NULL, 'v' }, { 0, 0, 0, 0 } }; int main(int argc, char **argv) { int c; int rv = EXIT_SUCCESS; int idx; while( (c = getopt_long(argc, argv, short_opts, long_opts, &idx)) != -1) { switch(c) { case 'd': opt_device = optarg; break; case 'f': opt_fallback_sound = 1; break; case 'g': opt_gain = atoi(optarg); break; case 'h': usage(argv[0]); return 0; case 'l': list_devices(); return 0; case 'm': opt_mute_keycode = strtol(optarg, NULL, 0); break; case 'M': muted = !muted; break; case 'p': opt_path_audio = optarg; break; case 's': opt_stereo_width = atoi(optarg); break; case 'c': opt_no_click++; break; case 'v': opt_verbose++; break; default: usage(argv[0]); return 1; break; } } if(opt_verbose) { open_console(); } /* Create openal context */ ALCdevice *device = NULL; ALCcontext *context = NULL; ALfloat listenerOri[] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f }; ALCenum error; if (!opt_device) { opt_device = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); } printd("Opening OpenAL audio device \"%s\"", opt_device); device = alcOpenDevice(opt_device); if (!device) { fprintf(stderr, "unable to open default device\n"); rv = EXIT_FAILURE; goto out; } context = alcCreateContext(device, NULL); if (!alcMakeContextCurrent(context)) { fprintf(stderr, "failed to make default context\n"); return -1; } TEST_ERROR("make default context"); alListener3f(AL_POSITION, 0, 0, 0); alListener3f(AL_VELOCITY, 0, 0, 0); alListenerfv(AL_ORIENTATION, listenerOri); /* Path to data files can also be specified by environment, this is * used by the snap package */ const char *env_path = getenv("BUCKLESPRING_WAV_DIR"); if (env_path) { opt_path_audio = env_path; } printd("Using wav dir: \"%s\"\n", opt_path_audio); scan(opt_verbose); out: device = alcGetContextsDevice(context); alcMakeContextCurrent(NULL); if(context) alcDestroyContext(context); if(device) alcCloseDevice(device); return rv; } static void usage(char *exe) { fprintf(stderr, "bucklespring version " VERSION "\n" "usage: %s [options]\n" "\n" "options:\n" "\n" " -d, --device=DEVICE use OpenAL audio device DEVICE\n" " -f, --fallback-sound use a fallback sound for unknown keys\n" " -g, --gain=GAIN set playback gain [0..100]\n" " -m, --mute-keycode=CODE use CODE as mute key (default 0x46 for scroll lock)\n" " -M, --mute start the program muted\n" " -c, --no-click don't play a sound on mouse click\n" " -h, --help show help\n" " -l, --list-devices list available OpenAL audio devices\n" " -p, --audio-path=PATH load .wav files from directory PATH\n" " -s, --stereo-width=WIDTH set stereo width [0..100]\n" " -v, --verbose increase verbosity / debugging\n", exe ); } static void list_devices(void) { const ALCchar *devices = alcGetString(NULL, ALC_DEVICE_SPECIFIER); const ALCchar *device = devices, *next = devices + 1; size_t len = 0; printf("Available audio devices:"); while (device && *device != '\0' && next && *next != '\0') { fprintf(stdout, " \"%s\"", device); len = strlen(device); device += (len + 1); next += (len + 2); } printf("\n"); } void printd(const char *fmt, ...) { if(opt_verbose) { char buf[256]; va_list va; va_start(va, fmt); vsnprintf(buf, sizeof(buf), fmt, va); va_end(va); fprintf(stderr, "%s\n", buf); } } /* * Find horizontal position of the given key on the keyboard. returns -1.0 for * left to 1.0 for right */ static double find_key_loc(int code) { int row; int col, keycol = 0; for(row=0; row<8; row++) { for(col=0; col<32; col++) { if(keyloc[row][col] == code) keycol = col+1; if(keyloc[row][col] == -1) break; } if(keycol) { return ((double) keycol-midloc[row])/(col-midloc[row]); } } return 0; } /* * To silence play temporarily, press mute key (default ScrollLock) within 2 * seconds, same to unmute */ static void handle_mute_key(int mute_key) { static time_t t_prev; static int count = 0; if(mute_key) { time_t t_now = time(NULL); if(t_now - t_prev < 2) { count ++; if(count == 2) { muted = !muted; printd("Mute %s", muted ? "enabled" : "disabled"); count = 0; } } else { count = 1; } t_prev = t_now; } else { count = 0; } } /* * Play audio file for given keycode. Wav files are loaded on demand */ int play(int code, int press) { ALCenum error; printd("scancode %d/0x%x", code, code); if (code == 0xff && opt_no_click) return 0; /* Check for mute sequence: ScrollLock down+up+down */ if (press) { handle_mute_key(code == opt_mute_keycode); } static ALuint buf[512] = { 0 }; static ALuint src[512] = { 0 }; int idx = code + press * 256; if(src[idx] == 0) { char fname[256]; snprintf(fname, sizeof(fname), "%s/%02x-%d.wav", opt_path_audio, code, press); printd("Loading audio file \"%s\"", fname); buf[idx] = alureCreateBufferFromFile(fname); if(buf[idx] == 0) { if(opt_fallback_sound) { snprintf(fname, sizeof(fname), "%s/%02x-%d.wav", opt_path_audio, 0x31, press); buf[idx] = alureCreateBufferFromFile(fname); } else { fprintf(stderr, "Error opening audio file \"%s\": %s\n", fname, alureGetErrorString()); } if(buf[idx] == 0) { src[idx] = SRC_INVALID; return -1; } } alGenSources((ALuint)1, &src[idx]); TEST_ERROR("source generation"); double x = find_key_loc(code); if (opt_stereo_width > 0) { alSource3f(src[idx], AL_POSITION, -x, 0, (100 - opt_stereo_width) / 100.0); } alSourcef(src[idx], AL_GAIN, opt_gain / 100.0); alSourcei(src[idx], AL_BUFFER, buf[idx]); TEST_ERROR("buffer binding"); } if(src[idx] != 0 && src[idx] != SRC_INVALID) { if (!muted) alSourcePlay(src[idx]); TEST_ERROR("source playing"); } return 0; } /* * End */ ```
/content/code_sandbox/main.c
c
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
3,177
```c #include <stdio.h> #include <X11/XKBlib.h> #include <X11/extensions/record.h> #include "buckle.h" void key_pressed_cb(XPointer arg, XRecordInterceptData *d); int scan(int verbose) { /* Initialize and start Xrecord context */ XRecordRange* rr; XRecordClientSpec rcs; XRecordContext rc; printd("Opening Xrecord context"); Display *dpy = XOpenDisplay(NULL); if(dpy == NULL) { fprintf(stderr, "Unable to open display\n"); return -1; } rr = XRecordAllocRange (); if(rr == NULL) { fprintf(stderr, "XRecordAllocRange error\n"); return -1; } rr->device_events.first = KeyPress; rr->device_events.last = ButtonReleaseMask; rcs = XRecordAllClients; rc = XRecordCreateContext (dpy, 0, &rcs, 1, &rr, 1); if(rc == 0) { fprintf(stderr, "XRecordCreateContext error\n"); return -1; } XFree (rr); if(XRecordEnableContext(dpy, rc, key_pressed_cb, NULL) == 0) { fprintf(stderr, "XRecordEnableContext error\n"); return -1; } /* We never get here */ return 0; } /* * Xrecord event callback */ void key_pressed_cb(XPointer arg, XRecordInterceptData *d) { if (d->category != XRecordFromServer) return; int key = ((unsigned char*) d->data)[1]; int type = ((unsigned char*) d->data)[0] & 0x7F; int repeat = d->data[2] & 1; key -= 8; /* X code to scan code? */ if(!repeat) { switch (type) { case KeyPress: play(key, 1); break; case KeyRelease: play(key, 0); break; case ButtonPress: if(key == -5 || key == -7) play(0xff, 1); break; case ButtonRelease: if(key == -5 || key == -7) play(0xff, 0); break; default: break; } } XRecordFreeData (d); } void open_console(void) { } ```
/content/code_sandbox/scan-x11.c
c
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
521
```unknown Name: OpenAL Description: OpenAL is a cross-platform 3D audio API Requires: Version: 1.17.2 Libs: Cflags: ```
/content/code_sandbox/mac/lib/pkgconfig/openal.pc
unknown
2016-02-03T12:20:04
2024-08-15T17:19:36
bucklespring
zevv/bucklespring
1,409
40
```unknown #!/usr/bin/env lua --require "format" --[[ a file access mode c process command name (all characters from proc or user structure) C file structure share count d file's device character code D file's major/minor device number (0x<hexadecimal>) f file descriptor (always selected) F file structure address (0x<hexadecimal>) G file flaGs (0x<hexadecimal>; names if +fg follows) g process group ID i file's inode number K tasK ID k link count l file's lock status L process login name m marker between repeated output n file name, comment, Internet address N node identifier (ox<hexadecimal> o file's offset (decimal) p process ID (always selected) P protocol name r raw device number (0x<hexadecimal>) R parent process ID s file's size (decimal) S file's stream identification t file's type T TCP/TPI information, identified by prefixes (the `=' is part of the prefix): QR=<read queue size> QS=<send queue size> SO=<socket options and values> (not all dialects) SS=<socket states> (not all dialects) ST=<connection state> TF=<TCP flags and values> (not all dialects) WR=<window read size> (not all dialects) WW=<window write size> (not all dialects) (TCP/TPI information isn't reported for all supported UNIX dialects. The -h or -? help output for the -T option will show what TCP/TPI reporting can be requested.) u process user ID z Solaris 10 and higher zone name Z SELinux security context (inhibited when SELinux is disabled) 0 use NUL field terminator character in place of NL 1-9 dialect-specific field identifiers (The output of -F? identifies the information to be found in dialect-specific fields.) ]] local function printf(fmt, ...) io.write(string.format(fmt, ...)) end -- -- Parse lsof output into lua tables -- local function parse_lsof() local procs = {} local cur, proc, file for l in io.lines() do if l:find("^COMMAND") then io.stderr:write("Unexpected input, did you run lsof with the `-F` flag?\n") os.exit(1) end local tag, val = l:sub(1, 1), l:sub(2) if tag == 'p' then if not procs[val] then proc = { files = {} } file = nil cur = proc procs[val] = proc else proc = nil cur = nil end elseif tag == 'f' and proc then file = { proc = proc } cur = file table.insert(proc.files, file) end if cur then cur[tag] = val end -- skip kernel threads if proc then if file and file.f == "txt" and file.t == "unknown" then procs[proc.p] = nil proc = nil file = nil cur = nil end end end return procs end local function find_conns(procs) local cs = { fifo = {}, -- index by inode unix = {}, -- index by inode tcp = {}, -- index by sorted endpoints udp = {}, -- index by sorted endpoints pipe = {}, -- index by sorted endpoints } for pid, proc in pairs(procs) do for _, file in ipairs(proc.files) do if file.t == "unix" then local us = cs.unix local i = file.i or file.d us[i] = us[i] or {} table.insert(us[i], file) end if file.t == "FIFO" then local fs = cs.fifo fs[file.i] = fs[file.i] or {} table.insert(fs[file.i], file) end if file.t == "PIPE" then -- BSD/MacOS for n in file.n:gmatch("%->(.+)") do local ps = { file.d, n } table.sort(ps) local id = table.concat(ps, "\\n") local fs = cs.pipe fs[id] = fs[id] or {} table.insert(fs[id], file) end end if file.t == "IPv4" or file.t == "IPv6" then local a, b = file.n:match("(.-)%->(.+)") local ps = { a, b } table.sort(ps) local id = table.concat(ps, "\\n") local fs = (file.P == "TCP") and cs.tcp or cs.udp fs[id] = fs[id] or {} table.insert(fs[id], file) end end end return cs end local procs = parse_lsof() local conns = find_conns(procs) -- Generate graph printf("digraph G {\n") printf(" graph [ center=true, margin=0.2, nodesep=0.1, ranksep=0.3, rankdir=LR];\n") printf(" node [ shape=box, style=\"rounded,filled\" width=0, height=0, fontname=Helvetica, fontsize=10];\n") printf(" edge [ fontname=Helvetica, fontsize=10];\n") -- Parent/child relationships for pid, proc in pairs(procs) do local color = (proc.R == "1") and "grey70" or "white" printf(' p%d [ label = "%s\\n%d %s" fillcolor=%q ];\n', proc.p, proc.n or proc.c, proc.p, proc.L, color) local proc_parent = procs[proc.R] if proc_parent then if proc_parent.p ~= "1" then printf(' p%d -> p%d [ penwidth=2 weight=100 color=grey60 dir="none" ];\n', proc.R, proc.p) end end end -- Connections local colors = { fifo = "green", unix = "purple", tcp = "red", udp = "orange", pipe = "orange", } for type, conn in pairs(conns) do for id, files in pairs(conn) do -- one-on-one connections if #files == 2 then local f1, f2 = files[1], files[2] local p1, p2 = f1.proc, f2.proc if p1 ~= p2 then local label = type .. ":\\n" .. id local dir = "both" if f1.a == "w" then dir = "forward" elseif f1.a == "r" then dir = "backward" end printf(' p%d -> p%d [ color="%s" label="%s" dir="%s"];\n', p1.p, p2.p, colors[type] or "black", label, dir) end end end end -- Done printf("}\n") -- vi: ft=lua ts=3 sw=3 ```
/content/code_sandbox/lsofgraph
unknown
2016-02-08T13:04:38
2024-07-25T23:01:32
lsofgraph
zevv/lsofgraph
1,017
1,682
```tex %% glossaries %% Chapter 1 \newglossaryentry{perceptron}{ name={}, description={\emph{Perceptron}} } \newglossaryentry{sigmoid-neuron}{ name={S }, description={\emph{Sigmoid Neuron}} } \newglossaryentry{sigmoid-func}{ name={S }, description={\emph{Sigmoid Function}} } \newglossaryentry{sgd}{ name={}, description={\emph{Stochastic Gradient Descent}} } \newglossaryentry{weight}{ name={}, description={\emph{Weight}} } \newglossaryentry{bias}{ name={}, description={\emph{Bias}} } \newglossaryentry{threshold}{ name={}, description={\emph{Threshold}} } \newglossaryentry{epoch}{ name={}, description={\emph{Epoch}} } \newglossaryentry{mini-batch}{ name={}, description={\emph{Mini-batch}} } \newglossaryentry{hidden-layer}{ name={}, description={\emph{Hidden Layer}} } \newglossaryentry{mlp}{ name={}, description={\emph{Multilayer Perceptron}} } \newglossaryentry{rnn}{ name={}, description={\emph{Recurrent Neural Network(s)}} } \newglossaryentry{cost-func}{ name={}, description={\emph{Cost Function}} } \newglossaryentry{learning-rate}{ name={}, description={\emph{Learning Rate}} } \newglossaryentry{bp}{ name={}, description={\emph{Backpropagation}} } \newglossaryentry{svm}{ name={}, description={\emph{Support Vector Machine}} } \newglossaryentry{deep-neural-networks}{ name={}, description={\emph{Deep Neural Networks}} } \newglossaryentry{error}{ name={}, description={\emph{Error}} } \newglossaryentry{reln}{ name={}, description={\emph{Rectified Linear Neuron}} } \newglossaryentry{relu}{ name={}, description={\emph{Rectified Linear Unit}} } \newglossaryentry{softmax}{ name={}, description={\emph{Softmax}} } \newglossaryentry{softmax-func}{ name={}, description={\emph{Softmax Function}} } \newglossaryentry{log-likelihood}{ name={}, description={\emph{Log-likelihood}} } \newglossaryentry{regularization}{ name={}, description={\emph{Regularization}} } \newglossaryentry{weight-decay}{ name={}, description={\emph{Weight Decay}} } \newglossaryentry{regularization-term}{ name={}, description={\emph{Regularization Term}} } \newglossaryentry{lrf}{ name={}, description={\emph{Local Receptive Fields}} } \newglossaryentry{shared-weights}{ name={}, description={\emph{Shared Weights}} } \newglossaryentry{pooling}{ name={}, description={\emph{Pooling}} } \newglossaryentry{cnn}{ name={}, description={\emph{Convolutional Neural Networks}} } \newglossaryentry{idui}{ name={}, description={\emph{Intention-driven User Interface}} } \newglossaryentry{tanh}{ name={}, description={\emph{Tanh} tanch} } \newglossaryentry{tanh-func}{ name={}, description={\emph{Tanh Function}} } \newglossaryentry{tanh-neuron}{ name={}, description={\emph{Tanh Neuron}} } \newglossaryentry{hyperbolic-tangent}{ name={}, description={\emph{Hyperbolic Tangent}} } \newglossaryentry{hyper-params}{ name={}, description={\emph{Hyper-parameters}} } \newglossaryentry{lstm}{ name={}, description={\emph{Long Short-term Memory Units}} } \newglossaryentry{dbn}{ name={}, description={\emph{Deep Belief Network(s)}} } %% ------ \newglossaryentry{logistic-regression}{ name={Logistic }, description={\emph{Logistic Regression}} } \newglossaryentry{naive-bayes}{ name={}, description={\emph{naive Bayes}} } \newglossaryentry{representations}{ name={}, description={\emph{Representations}} } \newglossaryentry{rep-learning}{ name={}, description={\emph{Representation Learning}} } \newglossaryentry{autoencoder}{ name={}, description={\emph{Autoencoder (s)}} } \newglossaryentry{encoder}{ name={}, description={\emph{encoder}} } \newglossaryentry{decoder}{ name={}, description={\emph{decoder}} } \newglossaryentry{fov}{ name={}, description={\emph{factors of variation}} } %% Chapter 2 \newglossaryentry{scalar}{ name={}, description={scalar} } \newglossaryentry{scalars}{ name={}, description={Scalars} } \newglossaryentry{vec}{ name={}, description={vector} } \newglossaryentry{vecs}{ name={}, description={Vectors} } \newglossaryentry{matrix}{ name={}, description={matrix} } \newglossaryentry{matrices}{ name={}, description={Matrices} } \newglossaryentry{tensor}{ name={}, description={tensor} } \newglossaryentry{tensors}{ name={}, description={Tensors} } \newglossaryentry{transpose}{ name={}, description={transpose} } \newglossaryentry{main-diag}{ name={}, description={main diagonal} } \newglossaryentry{broadcasting}{ name={}, description={broadcasting} } \newglossaryentry{matrix-product}{ name={}, description={matrix product} } \newglossaryentry{element-product}{ name={}, description={element-wise product} } \newglossaryentry{hadamard-product}{ name={}, description={Hadamard product} } \newglossaryentry{dot-product}{ name={}, description={dot product} } \newglossaryentry{matrix-inversion}{ name={}, description={matrix inversion} } \newglossaryentry{identity-matrix}{ name={}, description={identity matrix} } \newglossaryentry{linear-comb}{ name={}, description={linear combination} } \newglossaryentry{span}{ name={}, description={span} } \newglossaryentry{column-space}{ name={}, description={column space} } \newglossaryentry{range}{ name={}, description={range} } \newglossaryentry{linear-dep}{ name={}, description={linear dependence} } \newglossaryentry{linearly-dep}{ name={}, description={linearly dependent} } \newglossaryentry{linearly-indep}{ name={}, description={linearly independent} } \newglossaryentry{linear-indep}{ name={}, description={linear independent} } \newglossaryentry{square}{ name={}, description={square} } \newglossaryentry{singular}{ name={}, description={singular} } \newglossaryentry{norm}{ name={}, description={norm} } \newglossaryentry{tri-inequal}{ name={}, description={triangle inequality} } \newglossaryentry{eu-norm}{ name={}, description={Euclidean norm} } \newglossaryentry{max-norm}{ name={}, description={max norm} } \newglossaryentry{fr-norm}{ name={}, description={Frobenius norm} } \newglossaryentry{diag}{ name={}, description={Diagonal} } \newglossaryentry{symmetric}{ name={}, description={symmetric} } \newglossaryentry{unit-vec}{ name={}, description={unit vector} } \newglossaryentry{unit-norm}{ name={}, description={unit norm} } \newglossaryentry{ortho}{ name={}, description={orthogonal} } \newglossaryentry{orthonormal}{ name={}, description={orthonormal} } \newglossaryentry{orthonormal-matrix}{ name={}, description={orthonormal matrix} } \newglossaryentry{eigen-decompos}{ name={}, description={eigendecomposition} } \newglossaryentry{eigen-vec}{ name={}, description={eigenvector} } \newglossaryentry{eigen-vecs}{ name={}, description={eigenvectors} } \newglossaryentry{eigen-val}{ name={}, description={eigenvalue} } \newglossaryentry{eigen-vals}{ name={}, description={eigenvalues} } \newglossaryentry{left-eigen-vec}{ name={}, description={left eigenvector} } \newglossaryentry{positive-definite}{ name={}, description={positive definite} } \newglossaryentry{positive-semidefinite}{ name={}, description={positive semidefinite} } \newglossaryentry{negative-definite}{ name={}, description={negative definite} } \newglossaryentry{negative-semidefinite}{ name={}, description={negative semidefinite} } \newglossaryentry{svd}{ name={}, description={singular value decomposition} } \newglossaryentry{singular-vecs}{ name={}, description={singular vectors} } \newglossaryentry{singular-vals}{ name={}, description={singular values} } \newglossaryentry{singular-val}{ name={}, description={singular value} } \newglossaryentry{left-singular-vecs}{ name={}, description={left-singular vectors} } \newglossaryentry{right-singular-vecs}{ name={}, description={right-singular vectors} } \newglossaryentry{moore-penrose-pseudoinverse}{ name={--}, description={Moore-Penrose pseudoinverse} } \newglossaryentry{pca}{ name={}, description={principal components analysis} } %% Chapter 4 \newglossaryentry{overflow}{ name={}, description={overflow} } \newglossaryentry{underflow}{ name={}, description={underflow} } \newglossaryentry{cond-num}{ name={}, description={condition number} } \newglossaryentry{obj-func}{ name={}, description={objective function} } \newglossaryentry{criterion}{ name={}, description={criterion, criterion funciton } } \newglossaryentry{loss-func}{ name={}, description={loss function} } \newglossaryentry{err-func}{ name={}, description={error function} } \newglossaryentry{gradient-descent}{ name={}, description={gradient descent} } \newglossaryentry{critical-points}{ name={}, description={critical points} } \newglossaryentry{stationary-points}{ name={}, description={stationary points} } \newglossaryentry{local-min}{ name={}, description={local minimum} } \newglossaryentry{local-max}{ name={}, description={local maximum} } \newglossaryentry{saddle-points}{ name={}, description={saddle points} } \newglossaryentry{global-min}{ name={}, description={global minimum} } \newglossaryentry{partial-derivatives}{ name={}, description={partial derivatives} } \newglossaryentry{gradient}{ name={}, description={gradient} } \newglossaryentry{directional-derivative}{ name={}, description={directional derivative} } \newglossaryentry{steepest-descent}{ name={}, description={method of steepest descent} } \newglossaryentry{line-search}{ name={}, description={line search} } \newglossaryentry{hill-climbing}{ name={}, description={hill climbing} } \newglossaryentry{jacobian-matrix}{ name={}, description={Jacobian matrix} } \newglossaryentry{second-derivative}{ name={}, description={second derivative} } \newglossaryentry{curvature}{ name={}, description={curvature} } \newglossaryentry{hessian-matrix}{ name={}, description={Hessian matrix} } \newglossaryentry{second-derivative-test}{ name={}, description={second derivative test} } %% Chapter 12 \newglossaryentry{warps}{ name={}, description={\emph{Warps}} } \newglossaryentry{overfitting}{ name={}, description={\emph{Overfitting}} } \newglossaryentry{overtraining}{ name={}, description={\emph{Overtraining}} } \newglossaryentry{generalization_error}{ name={}, description={\emph{Generalization error}} } \newglossaryentry{dropout}{ name={}, description={\emph{Dropout}, } } \newglossaryentry{bdt}{ name={}, description={\emph{Boosted decision trees}} } \newglossaryentry{gcn}{ name={}, description={\emph{Global contrast normalization}, } } \newglossaryentry{mode}{ name={}, description={\emph{mode}, } } ```
/content/code_sandbox/glossaries.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
3,279
```tex % file: author.tex \chapter{} \label{ch:Author} \begin{minipage}{0.7\linewidth} \textbf{Michael Nielsen} \href{path_to_url}{path_to_url} \end{minipage} \hfill \begin{minipage}{0.25\linewidth} \includegraphics[width=\textwidth]{mn.jpg} \end{minipage} ```
/content/code_sandbox/author.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```unknown # Makefile # TEX = xelatex MKIDX = makeindex MKGLS = makeglossaries RM = rm -rf MAKE = make TARGET = nndl-ebook.pdf STYLES = $(wildcard *.sty) SOURCES := $(wildcard *.tex) IMAGEDEPS := $(wildcard images/*.tex) IMAGEDEPS += $(wildcard images/*.png) IMAGEDEPS += $(wildcard images/*.jpeg) .PHONY: all graphics all: graphics $(TARGET) $(TARGET): $(SOURCES) $(STYLES) $(IMAGEDEPS) $(TEX) $(basename $@) # $(MKIDX) $(basename $@) $(MKGLS) $(basename $@) $(TEX) $(basename $@) $(TEX) $(basename $@) graphics: $(MAKE) -C images clean: $(MAKE) -C images clean $(RM) *.pdf $(RM) *.aux $(RM) *.log $(RM) *.out $(RM) *.toc $(RM) *.idx $(RM) *.ilg $(RM) *.ind ```
/content/code_sandbox/Makefile
unknown
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
253
```tex % file: sai.tex \chapter{\emph{}\,} ~~ ~~ ~~ ~~ 16 17 16 ~~ ~~ ~~10001000 100 98\% ~~ 95\% 99\% 2007 ( ) DNA 1.25 DNA 30 96\% ~~1.25 /30 0.04166666666 1.25 4 ~~ A adenine, C cytosine, G guanine, T thymine 2 4 1.25 2.5 2.5 1.25 1.25 ~~ 26 ~~ 1.25 2500 King James 30 1000 1000 100 ~~10 ~~ 70 X 1015 ~~ 1.25 1.25 1.25 1.25 9 2000 4 Mriganka Sur orientation columns orientation map ~~ 1960 i.e. Marvin Minsky 1970 1980 Minsky agent society Minsky Minsky Minsky Minsky ~~~~ Python C Lisp ~~~~ 1980 Jack Schwartz Schwartz Schwartz ref ```
/content/code_sandbox/sai.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
307
```tex % file: translators.tex \chapter{} \label{ch:TranslationTeam} \section*{} \href{path_to_url}{Neural Networks and Deep Learning} \LaTeX \LaTeX \href{path_to_url}{GitHub} \href{path_to_url}{Xiaohu Zhu } \href{path_to_url}{} \href{path_to_url}{} \href{path_to_url}{issue} \href{path_to_url}{GitHub} \begin{flushright} ~Freeman Zhang \end{flushright} \section*{} \label{sec:TranslationTeam} \begin{itemize} \item \textbf{\href{mailto:xhzhu.nju@gmail}{Xiaohu Zhu}} \item \textbf{\href{mailto:zhanggyb@gmail.com}{Freeman Zhang}} \item \\ \begin{tabular}{l l l l l l l} \bfseries\href{path_to_url}{haria} & \bfseries\href{path_to_url}{yaoqingyuan} & \bfseries\href{path_to_url}{lzjqsdd} & \bfseries\href{path_to_url}{allenwoods} & \bfseries\href{path_to_url}{yangbenfa} & \bfseries\href{path_to_url}{timqian} & \bfseries\href{path_to_url}{jiefangxuanyan} \\ \end{tabular} \end{itemize} \section*{} \label{sec:KnownIssues} GitHub \href{path_to_url}{Issues} ```
/content/code_sandbox/translation.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
362
```tex % file: chap1.tex \chapter{} \label{ch:UsingNeuralNetsToRecognizeHandwrittenDigits} \begin{center} \includegraphics[width=64pt]{digits}\label{fig:digits} \end{center} 504192 {\serif V1}14 {\serif V1}~~ {\serif V2}{\serif V3}{\serif V4} {\serif V5}~~ ~~ 9 ~~ \begin{center} \includegraphics[width=.6\textwidth]{mnist_100_digits} \end{center} 100 74 96\% 99\% ~~~~ \gls*{perceptron} \gls*{sigmoid-neuron}% \gls*{sgd} \section{} \label{sec:Perceptrons} \textbf{\gls{perceptron}}% \gls*{perceptron}20 \href{path_to_url}{Frank Rosenblatt} \href{path_to_url}{% } \href{path_to_url}{Warren McCulloch} \href{path_to_url}{Walter Pitts} \href{path_to_url}{} ~~ \textbf{\gls{sigmoid-neuron}} \gls*{sigmoid-neuron} \gls*{sigmoid-neuron} \gls*{perceptron} \gls*{perceptron}\gls*{perceptron} $x_1,x_2,\ldots$ \begin{center} \includegraphics{tikz0} \end{center} \gls*{perceptron}$x_1,x_2,x_3$ Rosenblatt \textbf{\gls{weight}} $w_1,w_2,\ldots$$0$ $1$ \gls*{weight} $\sum_j w_j x_j$ % \textbf{\gls{threshold}}\gls*{weight}\gls*{threshold} \begin{equation} \text{output} = \begin{cases} 0 & \quad \text{if } \sum_j w_j x_j \leq \text{ threshold} \\ 1 & \quad \text{if } \sum_j w_j x_j > \text{ threshold} \\ \end{cases} \tag{1} \end{equation} \gls*{perceptron} \gls*{perceptron}\gls*{weight} \gls*{weight} \begin{enumerate} \item \item \item \end{enumerate} $x_1,x_2$ $x_3$ $x_1 = 1$$x_1 = 0$$x_2 = 1$ $x_2 = 0$$x_3$ \gls*{perceptron}\gls*{weight} $w_1 = 6$ $w_2 = 2$ $w_3 = 2$$w_1$ % \gls*{perceptron}\gls*{threshold} $5$\gls*{perceptron} $1$ $0$ \gls*{weight}\gls*{threshold} \gls*{threshold} $3$ \gls*{perceptron} \gls*{threshold} \gls*{perceptron}% \gls*{perceptron}% \gls*{perceptron} \begin{center} \includegraphics{tikz1} \end{center} \gls*{perceptron}~~\gls*{perceptron}~~ \gls*{perceptron} \gls*{perceptron} \gls*{perceptron} \gls*{perceptron} \gls*{perceptron}\gls*{perceptron} \gls*{perceptron} \gls*{perceptron}\gls*{perceptron}% \gls*{perceptron} \gls*{perceptron} $\sum_j w_j x_j$ $\sum_j w_j x_j$ $w \cdot x \equiv \sum_j w_j x_j$ $w$ $x$ \gls*{weight} \gls*{threshold}\gls*{perceptron}% \textbf{\gls{bias}} $b \equiv -threshold$ \gls*{bias}% \gls*{threshold}\gls*{perceptron} \begin{equation} \text{output} = \begin{cases} 0 & \quad \text{if } w\cdot x + b \leq 0 \\ 1 & \quad \text{if } w\cdot x + b > 0 \end{cases} \tag{2} \end{equation} \gls*{bias}\gls*{perceptron} $1$ \gls*{perceptron}\gls*{bias}% \gls*{perceptron} $1$ $1$ \gls*{bias}\gls*{perceptron} \gls*{threshold}\gls*{bias} \gls*{perceptron}\gls*{perceptron} \textbf{}\textbf{}\textbf{} \gls*{weight} $-2$\gls*{bias} $3$ \gls*{perceptron} \begin{center} \includegraphics{tikz2} \end{center} $00$ $1$ $(-2)*0 + (-2)*0 + 3 = 3$ $*$ $11$ $0$ $(-2)*1 + (-2)*1 + 3 = -1$ \gls*{perceptron} \gls*{perceptron} $x_1$ $x_2$$x_1 \oplus x_2$ $x_1$ $x_2$ $1$ $1$ $x_1x_2$ \begin{center} \includegraphics{tikz3} \end{center} \gls*{perceptron}\gls*{perceptron} \gls*{weight} $-2$\gls*{bias} $3$ \begin{center} \includegraphics{tikz4} \end{center} \gls*{perceptron}\gls*{perceptron} \gls*{perceptron}\gls*{perceptron} \gls*{weight} $-4$ \gls*{weight} $-2$ \gls*{weight} $-2$\gls*{bias} $3$\gls*{weight} $-4$ \begin{center} \includegraphics{tikz5} \end{center} $x_1$ $x_2$ \gls*{perceptron} \gls*{perceptron}~~~~ \begin{center} \includegraphics{tikz6} \end{center} \gls*{perceptron} \begin{center} \includegraphics{tikz7} \end{center} \gls*{perceptron} \gls*{perceptron} $\sum_j w_j x_j$ \gls*{perceptron} $b > 0$ $1$ $b \leq 0$ $0$% \gls*{perceptron} $x_1$ \gls*{perceptron}\gls*{perceptron} $x_1, x_2,\ldots$ \gls*{perceptron} \gls*{perceptron} \gls*{perceptron} \gls*{perceptron} \textbf{} \gls*{weight}\gls*{bias} \textbf{} \section{S } \label{seq:sigmoid_neurons} % \gls*{perceptron} \gls*{weight}\gls*{bias} \gls*{weight}% \gls*{bias} \begin{center} \includegraphics{tikz8} \end{center} \gls*{weight}\gls*{bias} \gls*{weight}\gls*{bias} 98 \gls*{weight}\gls*{bias} 9\gls*{weight}\gls*{bias} \gls*{perceptron} \gls*{perceptron}\gls*{weight}\gls*{bias} \gls*{perceptron} $0$ $1$ 9 % \gls*{weight}\gls*{bias} \gls*{perceptron} \gls*{sigmoid-neuron}% \gls*{sigmoid-neuron}\gls*{perceptron}\gls*{weight}% \gls*{bias} , \gls*{sigmoid-neuron}\gls*{perceptron} \gls*{sigmoid-neuron} \begin{center} \includegraphics{tikz9} \end{center} \gls*{perceptron}\gls*{sigmoid-neuron}$x_1,x_2,\ldots$ $0$ $1$ $0$ $1$ $0.638\ldots$ \gls*{sigmoid-neuron} \gls*{sigmoid-neuron}\gls*{weight}$w_1,w_2,\ldots$% \gls*{bias}$b$ $0$ $1$ $\sigma(w \cdot x+b)$ $\sigma$ S\footnote{$\sigma$ \textbf{ }\textbf{} S } \begin{equation} \sigma(z) \equiv \frac{1}{1+e^{-z}} \label{eq:3}\tag{3} \end{equation} $x_1,x_2,\ldots$\gls*{weight} $w_1,w_2,\ldots$\gls*{bias} $b$ \gls*{sigmoid-neuron} \begin{equation} \frac{1}{1+\exp(-\sum_j w_j x_j-b)} \label{eq:4}\tag{4} \end{equation} \gls*{sigmoid-neuron}\gls*{perceptron} S \gls*{perceptron} \gls*{sigmoid-neuron}\gls*{sigmoid-func} \gls*{perceptron} $z \equiv w \cdot x + b$ $e^{-z} \approx 0$ $\sigma(z) \approx 1$ $z = w \cdot x+b$ \gls*{sigmoid-neuron} $1$% \gls*{perceptron} $z = w \cdot x+b$ $e^{-z} \rightarrow \infty$$\sigma(z) \approx 0$ $z = w \cdot x +b$ \gls*{sigmoid-neuron}\gls*{perceptron} $w \cdot x+b$ \gls*{perceptron} $\sigma$ $\sigma$ ~~ \begin{center} \includegraphics{sigmoid_function} \label{fig:SigmoidFunction} \end{center} \begin{center} \includegraphics{step_function} \label{fig:StepFunction} \end{center} $\sigma$ $w\cdot x+b$ \footnote{ $w \cdot x +b = 0$ \gls*{perceptron} $0$ $1$ }S\gls*{perceptron} $\sigma$ \gls*{perceptron}$\sigma$ $\sigma$ \gls*{weight}% \gls*{bias} $\Delta w_j$ $\Delta b$ $\Delta \mbox{output}$ $\Delta \mbox{output}$ \begin{equation} \Delta \mbox{output} \approx \sum_j \frac{\partial \, \mbox{output}}{\partial w_j} \Delta w_j + \frac{\partial \, \mbox{output}}{\partial b} \Delta b \label{eq:5}\tag{5} \end{equation} \gls*{weight} $w_j$ $\partial \, \mbox{output} / \partial w_j$ $\partial \, \mbox{output} /\partial b$ $output$ $w_j$ $b$ $\Delta \mbox{output}$ \gls*{weight}\gls*{bias}~~ $\Delta w_j$ $\Delta b$~~\gls*{weight} \gls*{bias}% \gls*{sigmoid-neuron}\gls*{perceptron}% \gls*{weight}\gls*{bias} $\sigma$ ~\eqref{eq:3} $\sigma$ $f(\cdot)$ $f(w \cdot x + b)$ ~\eqref{eq:5} $\sigma$ $\sigma$ \gls*{sigmoid-neuron}\gls*{perceptron} \gls*{sigmoid-neuron} \gls*{sigmoid-neuron} $0$ $1$ $0$ $1$ $0.173\ldots$ $0.689\ldots$ 99 $0$ $1$ \gls*{perceptron} $0.5$ 9 $0.5$ 9 \subsection*{} \begin{itemize} \item \textbf{\gls*{sigmoid-neuron}\gls*{perceptron}}\\ \gls*{perceptron}\gls*{bias}$c>0$ \item \textbf{\gls*{sigmoid-neuron}\gls*{perceptron}}\\ ~~\gls*{perceptron} % \gls*{perceptron} $x$ \gls*{weight}\gls*{bias} $w \cdot x + b \neq 0$ \gls*{sigmoid-neuron}\gls*{perceptron}% \gls*{weight}\gls*{bias} $c>0$ $c \rightarrow \infty$ \gls*{sigmoid-neuron}\gls*{perceptron} \gls*{perceptron} $w \cdot x + b = 0$ \end{itemize} \section{} \begin{center} \includegraphics{tikz10} \end{center} \textbf{} \textbf{}\textbf{} % \textbf{\gls{hidden-layer}}~~ ~~ \begin{center} \includegraphics{tikz11} \end{center} \gls*{sigmoid-neuron}% \gls*{perceptron}\textbf{\gls{mlp}}\textbf{MLP} MLP 9 $64 \times 64$ $4096 = 64 \times 64$ $0$ $1$ $0.5$ $9$ $0.5$ $9$ % \textbf{}~~ $\sigma$ % \href{path_to_url}{\gls{rnn}} \gls*{rnn} \section{} \begin{center} \includegraphics[width=64pt]{digits} \end{center} \begin{center} \includegraphics[height=32pt]{digits_separate} \end{center} \begin{center} \includegraphics[height=24pt]{mnist_first_digit} \end{center} $5$ \begin{center} \includegraphics{tikz12} \end{center} $28 \times 28$ $784 = 28 \times 28$ $784$ $0.0$ $1.0$ $n$ $n$ $n=15$ $10$ $\approx 1$ $0$ $1$ $0$ $9$ $6$ $6$ $10$ $0, 1, 2, \ldots, 9$ $4$ $0$ $1$~ $2^4 = 16$ $10$ $10$ $10$ 4 $10$ 10 $4$ $10$ 0 \begin{center} \includegraphics[height=32pt]{mnist_top_left_feature} \end{center} \gls*{weight} \gls*{weight} \begin{center} \includegraphics[height=32pt]{mnist_other_features} \end{center} \hyperref[fig:digits]{} $0$ \begin{center} \includegraphics[height=32pt]{mnist_complete_zero} \end{center} $0$ $0$ ~~ $0$ $0$ $10$ $4$ $4$ \gls*{weight}4 \subsection*{} \begin{itemize} \item % \gls*{weight}\gls*{bias}3 $0.99$ $0.01$ \begin{center} \includegraphics{tikz13} \end{center} \end{itemize} \section{} \label{sec:learning_with_gradient_descent} ~~ \href{path_to_url}{MNIST } MNIST \href{path_to_url}{NIST} ~~ MNIST \begin{center} \includegraphics[height=32pt]{digits_separate} \end{center} \hyperref[fig:digits]{} MNIST 60,000 250 $28 \times 28$ 10,000 $28 \times 28$ \textbf{} 250 $x$ $x$ $28 \times 28 = 784$ $y = y(x)$ $y$ $10$ $6$ $x$ $y(x) = (0, 0, 0, 0, 0, 0, 1, 0, 0, 0)^T$ $T$ \gls*{weight}\gls*{bias} $y(x)$ $x$% \textbf{\gls{cost-func}}\footnote{\textbf{}\textbf{} } \begin{equation} C(w,b) \equiv \frac{1}{2n} \sum_x \| y(x) - a\|^2 \label{eq:6}\tag{6} \end{equation} $w$ \gls*{weight}$b$ \gls*{bias}$n$ $a$ $x$ $x$ $a$ $x$, $w$ $b$ $\|v\|$ $v$ $C$ % \textbf{}\gls*{cost-func}\textbf{ }\textbf{MSE} $C(w,b)$ $C(w,b)$ $C(w,b) \approx 0$ $x$ $y(x)$ $a$ \gls*{weight}% \gls*{bias} $C(w,b) \approx 0$ $C(w,b)$ $y(x)$ $a$ \gls*{weight}\gls*{bias} $C(w,b)$ \gls*{weight}\gls*{bias}% \textbf{} \gls*{weight}\gls*{bias} \gls*{weight}\gls*{bias} \gls*{weight}% \gls*{bias} \gls*{weight}\gls*{bias} ~\eqref{eq:6} \textbf{} \gls*{weight}\gls*{bias} ~\eqref{eq:6} $C(w,b)$ % \gls*{weight}\gls*{bias} ~~\gls*{weight} $w$ \gls*{bias} $b$ $\sigma$ MNIST \textbf{ } $C(v)$$v = v_1, v_2, \ldots$ $v$ $w$ $b$ ~~ $C(v)$ $C$ $v1$ $v2$ \begin{center} \includegraphics{valley} \end{center} $C$ \textbf{} $C$ $C$ $C$ \textbf{}% \gls*{weight}\gls*{bias} $C$ $C$ $C$ ~~ $C$ $v1$ $v2$ $\Delta v1$ $\Delta v2$ $C$ \begin{equation} \Delta C \approx \frac{\partial C}{\partial v_1} \Delta v_1 + \frac{\partial C}{\partial v_2} \Delta v_2 \label{eq:7}\tag{7} \end{equation} $\Delta v_1$ $\Delta v_2$ $\Delta C$ $\Delta v$ $v$ $\Delta v \equiv (\Delta v_1, \Delta v_2)^T$$T$ $C$ $\left(\frac{\partial C}{\partial v_1}, \frac{\partial C}{\partial v_2}\right)^T$ $\nabla C$ \begin{equation} \nabla C \equiv \left( \frac{\partial C}{\partial v_1}, \frac{\partial C}{\partial v_2} \right)^T \label{eq:8}\tag{8} \end{equation} $\Delta v$ $\nabla C$ $\Delta C$ $\nabla C$ $\nabla$ $\nabla$ $\nabla C$ ~~~~ $\nabla$ $\nabla C$ $\nabla$ $\Delta C$ ~\eqref{eq:7} \begin{equation} \Delta C \approx \nabla C \cdot \Delta v \label{eq:9}\tag{9} \end{equation} $\nabla C$ $\nabla C$ $v$ $C$ $\Delta v$ $\Delta C$ \begin{equation} \Delta v = -\eta \nabla C \label{eq:10}\tag{10} \end{equation} $\eta$ \textbf{\gls{learning-rate}} ~\eqref{eq:9} $\Delta C \approx -\eta \nabla C \cdot \nabla C = -\eta \|\nabla C\|^2$ $\| \nabla C \|^2 \geq 0$$\Delta C \leq 0$ ~\eqref{eq:10} $v$ $C$ ~\eqref{eq:9} ~\eqref{eq:10} ~\eqref{eq:10} $\Delta v$ $v$ \begin{equation} v \rightarrow v' = v -\eta \nabla C \label{eq:11}\tag{11} \end{equation} $C$ ~~~~ $\nabla C$\textbf{ } \begin{center} \includegraphics{valley_with_ball} \end{center} $\Delta v$ \gls*{learning-rate} $\eta$ ~\eqref{eq:9} $\Delta C > 0$ $\eta$ $\Delta v$ $\eta$ ~\eqref{eq:9} $C$ $C$ $C$ $m$ $v_1,\ldots,v_m$ $C$ $\Delta v = (\Delta v_1, \ldots, \Delta v_m)^T$$\Delta C$ \begin{equation} \Delta C \approx \nabla C \cdot \Delta v \label{eq:12}\tag{12} \end{equation} $\nabla C$ \begin{equation} \nabla C \equiv \left(\frac{\partial C}{\partial v_1}, \ldots, \frac{\partial C}{\partial v_m}\right)^T \label{eq:13}\tag{13} \end{equation} \begin{equation} \Delta v = -\eta \nabla C \label{eq:14}\tag{14} \end{equation} $\Delta C$ ~\eqref{eq:12} $C$ \begin{equation} v \rightarrow v' = v-\eta \nabla C \label{eq:15}\tag{15} \end{equation} \textbf{} $v$ $C$ ~~ $C$ $\Delta v$ $C$ $\Delta C \approx \nabla C \cdot \Delta v$ $\| \Delta v \| = \epsilon$ $\epsilon > 0$ $C$ $\nabla C \cdot \Delta v$ $\Delta v$ $\Delta v = - \eta \nabla C$ $\eta = \epsilon / \|\nabla C\|$ $\|\Delta v\| = \epsilon$ $C$ \subsection*{} \begin{itemize} \item % \href{path_to_urlSchwarz_inequality}{- } \item $C$ $C$ \end{itemize} $C$ $\partial^2 C/ \partial v_j \partial v_k$ $v_j$\footnote{ $\partial^2 C/ \partial v_j \partial v_k = \partial^2 C/ \partial v_k \partial v_j$} ~\eqref{eq:6} \gls*{weight} $w_k$ \gls*{bias} $b_l$ \gls*{weight}\gls*{bias} $v_j$ $w_k$ $b_l$ $\nabla C$ $\partial C / \partial w_k$$\partial C / \partial b_l$ \begin{align} \label{eq:16}w_k \rightarrow w_k' &= w_k-\eta \frac{\partial C}{\partial w_k}\tag{16}\\ \label{eq:17}b_l \rightarrow b_l' &= b_l-\eta \frac{\partial C}{\partial b_l}\tag{17} \end{align} \eqref{eq:6} $C = \frac{1}{n} \sum_x C_x$ $C_x \equiv \frac{\|y(x)-a\|^2}{2}$ $\nabla C$ $x$ $\nabla C_x$$\nabla C = \frac{1}{n} \sum_x \nabla C_x$ \textbf{\gls{sgd}} $\nabla C_x$ $\nabla C$ $\nabla C$ $m$ $X_1, X_2, \ldots, X_m$% \textbf{\gls{mini-batch}} $m$ $\nabla C_{X_j}$ $\nabla C_x$ \begin{equation} \frac{\sum_{j=1}^m \nabla C_{X_{j}}}{m} \approx \frac{\sum_x \nabla C_x}{n} = \nabla C \label{eq:18}\tag{18} \end{equation} \begin{equation} \nabla C \approx \frac{1}{m} \sum_{j=1}^m \nabla C_{X_{j}} \label{eq:19}\tag{19} \end{equation} \gls*{mini-batch} $w_k$ $b_l$ \gls*{bias}\gls*{mini-batch} \begin{align} \label{eq:20}w_k \rightarrow w_k' &= w_k-\frac{\eta}{m} \sum_j \frac{\partial C_{X_j}}{\partial w_k} \tag{20}\\ \label{eq:21}b_l \rightarrow b_l' &= b_l-\frac{\eta}{m} \sum_j \frac{\partial C_{X_j}}{\partial b_l} \tag{21} \end{align} \gls*{mini-batch} $X_j$ \gls*{mini-batch} \textbf{\gls{epoch}} \gls*{epoch} \gls*{weight}\gls*{bias} \gls*{mini-batch}~\eqref{eq:6} $\frac{1}{n}$ \gls*{cost-func} $\frac{1}{n}$ \gls*{mini-batch}~\eqref{eq:20}~\eqref{eq:21} $\frac{1}{m}$% \gls*{learning-rate} $\eta$ \gls*{mini-batch} $n = 60,000$ MNIST \gls*{mini-batch} $m = 10$ $6,000$ ~~~~ $C$ \subsection*{} \begin{itemize} \item \gls*{mini-batch} $1$ $x$ $w_k \rightarrow w_k' = w_k - \eta \partial C_x / \partial w_k$ $b_l \rightarrow b_l' = b_l - \eta \partial C_x / \partial b_l$ \gls*{weight}\gls*{bias} \gls*{weight}\gls*{bias}\textbf{}% \textbf{online}\textbf{on-line}\textbf{} online $20$ \end{itemize} $C$ \gls*{weight}\gls*{bias} $\Delta C$ $C$ % \href{path_to_url}{ } \section{} \label{sec:implementing_our_network_to_classify_digits} MNIST MNIST \lstinline!git! \begin{lstlisting}[language=sh] git clone path_to_url \end{lstlisting} \lstinline!git!% \href{path_to_url}{ } MNIST 60,000 10,000 MNIST 60,000 MNIST 50,000 10,000 % \textbf{} \textbf{\gls{hyper-params}}~~% \gls*{learning-rate} MNIST MNIST MNIST 50,000 60,000\footnote{MNISTNIST MNISTNIST Yann LeCunCorinna CortesChristopher J. C. Burges Python MNISTLISA \href{path_to_url}{}} MNIST \href{path_to_url}{Numpy} Python Numpy% \href{path_to_url}{} \lstinline!Network! \lstinline!Network! \begin{lstlisting}[language=Python] class Network(object): def __init__(self, sizes): self.num_layers = len(sizes) self.sizes = sizes self.biases = [np.random.randn(y, 1) for y in sizes[1:]] self.weights = [np.random.randn(y, x) for x, y in zip(sizes[:-1], sizes[1:])] \end{lstlisting} \lstinline!sizes! 2 3 1 \lstinline!Network! \begin{lstlisting}[language=Python] net = Network([2, 3, 1]) \end{lstlisting} \lstinline!Network! \gls*{bias}\gls*{weight} Numpy \lstinline!np.random.randn! 0 1 \gls*{weight}\gls*{bias} \lstinline!Network! \gls*{bias}\gls*{bias} \gls*{bias}\gls*{weight} Numpy \lstinline!net.weights[1]! \gls*{weight} Numpy Python 0 \lstinline!net.weights[1]! $w$ $w_{jk}$ $k^{\rm th}$ $j^{\rm th}$ \gls*{weight} $j$ $k$ ~~ $j$ $k$ \begin{equation} a' = \sigma(w a + b) \label{eq:22}\tag{22} \end{equation} $a$ $a'$\gls*{weight} $w$ $a$\gls*{bias} $b$ $w a +b$ $\sigma$ $\sigma$ \textbf{}~\eqref{eq:22} S ~\eqref{eq:4} \subsection*{} \begin{itemize} \item ~\eqref{eq:22}\gls*{sigmoid-neuron} ~\eqref{eq:4} \end{itemize} \lstinline!Network! S \begin{lstlisting}[language=Python] def sigmoid(z): return 1.0/(1.0+np.exp(-z)) \end{lstlisting} $z$ Numpy Numpy \lstinline!sigmoid! \lstinline!Network! \lstinline!feedforward! $a$\footnote{ $a$ \lstinline!(n,1)! Numpy ndarray \lstinline!(n,)! \lstinline!n! \lstinline!(n,)! \lstinline!(n,)! \lstinline!(n,1)! ndarray } ~\eqref{eq:22} \begin{lstlisting}[language=Python] def feedforward(self, a): """Return the output of the network if "a" is input.""" for b, w in zip(self.biases, self.weights): a = sigmoid(np.dot(w, a)+b) return a \end{lstlisting} \lstinline!Network! \lstinline!SGD! \begin{lstlisting}[language=Python] def SGD(self, training_data, epochs, mini_batch_size, eta, test_data=None): """Train the neural network using mini-batch stochastic gradient descent. The "training_data" is a list of tuples "(x, y)" representing the training inputs and the desired outputs. The other non-optional parameters are self-explanatory. If "test_data" is provided then the network will be evaluated against the test data after each epoch, and partial progress printed out. This is useful for tracking progress, but slows things down substantially.""" if test_data: n_test = len(test_data) n = len(training_data) for j in xrange(epochs): random.shuffle(training_data) mini_batches = [ training_data[k:k+mini_batch_size] for k in xrange(0, n, mini_batch_size)] for mini_batch in mini_batches: self.update_mini_batch(mini_batch, eta) if test_data: print "Epoch {0}: {1} / {2}".format( j, self.evaluate(test_data), n_test) else: print "Epoch {0} complete".format(j) \end{lstlisting} \lstinline!training_data! \lstinline!(x, y)! \lstinline!epochs! \lstinline!mini_batch_size! ~~\gls*{epoch}\gls*{mini-batch}{}\lstinline!eta! % \gls*{learning-rate}$\eta$ \lstinline!test_data! \gls*{epoch} \gls*{mini-batch}{} \lstinline!mini_batch! \lstinline!self.update_mini_batch(mini_batch, eta)! \lstinline!mini_batch! % \gls*{weight}\gls*{bias} \lstinline!update_mini_batch! \begin{lstlisting}[language=Python] def update_mini_batch(self, mini_batch, eta): """Update the network's weights and biases by applying gradient descent using backpropagation to a single mini batch. The "mini_batch" is a list of tuples "(x, y)", and "eta" is the learning rate.""" nabla_b = [np.zeros(b.shape) for b in self.biases] nabla_w = [np.zeros(w.shape) for w in self.weights] for x, y in mini_batch: delta_nabla_b, delta_nabla_w = self.backprop(x, y) nabla_b = [nb+dnb for nb, dnb in zip(nabla_b, delta_nabla_b)] nabla_w = [nw+dnw for nw, dnw in zip(nabla_w, delta_nabla_w)] self.weights = [w-(eta/len(mini_batch))*nw for w, nw in zip(self.weights, nabla_w)] self.biases = [b-(eta/len(mini_batch))*nb for b, nb in zip(self.biases, nabla_b)] \end{lstlisting} \begin{lstlisting}[language=Python] delta_nabla_b, delta_nabla_w = self.backprop(x, y) \end{lstlisting} \textbf{\gls{bp}} \lstinline!update_mini_batch! \lstinline!mini_batch! \lstinline!self.weights! \lstinline!self.biases! \lstinline!self.backprop! \lstinline!self.backprop! $x$ \lstinline!self.backprop! ~~ \lstinline!self.SGD! \lstinline!self.update_mini_batch! \lstinline!self.backprop! \lstinline!sigmoid_prime! $\sigma$ \lstinline!self.cost_derivative! 74 GitHub % \href{path_to_url}{ } \lstinputlisting[language=Python]{code_samples/src/network.py} MNIST \lstinline!mnist_loader.py! Python shell \begin{lstlisting}[language=Python] >>> import mnist_loader >>> training_data, validation_data, test_data = \ ... mnist_loader.load_data_wrapper() \end{lstlisting} Python Python shell MNIST 30 \lstinline!Network! \lstinline!network! Python \begin{lstlisting}[language=Python] >>> import network >>> net = network.Network([784, 30, 10]) \end{lstlisting} MNIST \lstinline!training_data! 30 % \gls*{epoch}\gls*{mini-batch} 10\gls*{learning-rate} $\eta = 3.0$ \begin{lstlisting}[language=Python] >>> net.SGD(training_data, 30, 10, 3.0, test_data=test_data) \end{lstlisting} ~~ 2015 \gls*{epoch} Python \gls*{weight}\gls*{bias} Javascript \gls*{epoch} 10,000 9,129 \begin{lstlisting}[language=sh] Epoch 0: 9129 / 10000 Epoch 1: 9295 / 10000 Epoch 2: 9348 / 10000 ... Epoch 27: 9528 / 10000 Epoch 28: 9542 / 10000 Epoch 29: 9534 / 10000 \end{lstlisting} 95\%~~ 95.42\%Epoch 28 \gls*{weight} \gls*{bias} 100 \begin{lstlisting}[language=Python] >>> net = network.Network([784, 100, 10]) >>> net.SGD(training_data, 30, 10, 3.0, test_data=test_data) \end{lstlisting} 96.59\% \footnote{ } \gls*{epoch}\gls*{mini-batch} \gls*{learning-rate} $\eta$ \gls*{hyper-params} \gls*{weight}\gls*{bias}\gls*{hyper-params} \gls*{learning-rate} $\eta = 0.001$, \begin{lstlisting}[language=Python] >>> net = network.Network([784, 100, 10]) >>> net.SGD(training_data, 30, 10, 0.001, test_data=test_data) \end{lstlisting} \begin{lstlisting}[language=sh] Epoch 0: 1139 / 10000 Epoch 1: 1136 / 10000 Epoch 2: 1135 / 10000 ... Epoch 27: 2101 / 10000 Epoch 28: 2123 / 10000 Epoch 29: 2142 / 10000 \end{lstlisting} \gls*{learning-rate} $\eta = 0.01$ \gls*{learning-rate} $\eta = 1.0$ % \gls*{learning-rate}$3.0$ \gls*{hyper-params}\gls*{hyper-params} \gls*{hyper-params} 30 $\eta = 100.0$ \begin{lstlisting}[language=Python] >>> net = network.Network([784, 30, 10]) >>> net.SGD(training_data, 30, 10, 100.0, test_data=test_data) \end{lstlisting} \gls*{learning-rate} \begin{lstlisting}[language=sh] Epoch 0: 1009 / 10000 Epoch 1: 1009 / 10000 Epoch 2: 1009 / 10000 Epoch 3: 1009 / 10000 ... Epoch 27: 982 / 10000 Epoch 28: 982 / 10000 Epoch 29: 982 / 10000 \end{lstlisting} \gls*{learning-rate} \gls*{learning-rate} % \gls*{weight}\gls*{bias} \gls*{epoch} \gls*{learning-rate}\gls*{learning-rate} \gls*{hyper-params}\gls*{hyper-params} \subsection*{} \begin{itemize} \item ~~ 784 10 \end{itemize} MNIST MNIST ~~ Numpy \lstinline!ndarry! \lstinline!ndarray! \lstinputlisting[language=Python]{code_samples/src/mnist_loader.py} 10\% $2$ $1$ \begin{center} \includegraphics[height=32pt]{mnist_2_and_1} \end{center} $0, 1, 2,\ldots, 9$ ~~ \href{path_to_url}{GitHub } $10,000$ $2,225$ $22.25\%$ $20\%$ $50\%$ $50\%$ \textbf{\gls{svm}}\textbf{SVM} SVM SVM \href{path_to_url}{scikit-learn} Python Python SVM \href{path_to_url~cjlin/libsvm/}{LIBSVM} C scikit-learn SVM $10,000$ $9,435$% \href{path_to_url}{ } SVM SVM $10,000$ $9,435$ scikit-learn SVM SVM \href{path_to_url}{Andreas Mueller} % \href{path_to_url}{} Mueller SVM 98.5\% SVM70 MNIST SVM2013 $10,000$ $9,979$ \href{path_to_url~wanli/}{Li Wan} \href{path_to_url}{Matthew Zeiler}Sixin Zhang \href{path_to_url}{Yann LeCun} \href{path_to_url~fergus/pmwiki/pmwiki.php}{Rob Fergus} MNIST \begin{center} \includegraphics[height=64pt]{mnist_really_bad_images} \end{center} MNIST $10,000$ $21$ MNIST Wan \begin{center} $\leq$ + \end{center} \section{} \label{sec:toward_deep_learning} \gls*{bias} AI \gls*{weight}% \gls*{bias} \footnote{ \href{path_to_url}{1}. \href{path_to_url}{Ester Inbar}. \href{path_to_url}{2}. . \href{path_to_url}{3}. NASA, ESA, G. Illingworth, D. Magee, and P. Oesch (University of California, Santa Cruz), R. Bouwens (Leiden University), and the HUDF09 Team. } \begin{center} \includegraphics[height=125pt]{images/Kangaroo_ST_03} \includegraphics[height=125pt]{images/Albert_Einstein_at_the_age_of_three_(1882)} \includegraphics[height=125pt]{images/The_Hubble_eXtreme_Deep_Field} \end{center} ~~ \gls*{weight}\gls*{bias} \begin{center} \includegraphics{tikz14} \end{center} ~~ ~~ \begin{center} \includegraphics{tikz15} \end{center} ~~ ~~ ~~~~% \textbf{\gls{deep-neural-networks}} \gls*{weight}% \gls*{bias} \gls*{weight}\gls*{bias}~~80 90 2006 ~~ 5 10 ```
/content/code_sandbox/chap1.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
10,454
```tex % file: plots.tex % The following 2 macros are used for plotting learning curve in chapter 3: % learn cost curve of a single sigmoid neutron with quadratic cost function \newcommand{\quadraticCostLearning}[4]{ \begin{tikzpicture}[ inner sep=0pt, minimum size=10mm, font=\footnotesize, background rectangle/.style={ draw=gray!25, fill=gray!10, rounded corners }, show background rectangle] \coordinate (origin) at (0,0); \coordinate(x) at (3.5,0); \coordinate(y) at (0,2.5); \node(i) [above=4 of origin,xshift=-5mm] {Input: $1.0$}; \node(n) [right=2 of i,circle,draw] {}; \node(epoch) [right=of x,xshift=-1cm] {Epoch}; \node(cost) [left=of y,xshift=1cm] {Cost}; \draw[->] (origin) to (x); \draw[->] (origin) to (y); %\draw[blue,thick,domain=0:2] plot (\x, {(\x*\x / 2)}); \tikzmath{ % Do not contain blank line function sigmoid(\z) { return 1/(1 + exp(- \z)); }; function sigmoid_neutron(\w,\b) { return sigmoid(\w + \b); }; function quad_cost(\a) { % the quadratic cost function return (\a * \a)/2; }; function quad_cost_derivative(\a) { return \a * \a * (1-\a); }; \w = #1; % start weight \b = #2; % start bias \e = #3; % eta, learning rate \y = 0; \a = sigmoid_neutron(\w,\b); \dt = quad_cost_derivative(\a); \xo = 0; \yo = quad_cost(\a); integer \x; if #4 > 0 then { for \x in {1,...,#4}{ % epoches \a = sigmoid_neutron(\w,\b); \dt = quad_cost_derivative(\a); \w = \w - \e * \dt; \b = \b - \e * \dt; \y = quad_cost(\a); {\draw[blue,thick] (\xo/100,\yo*5) -- (\x/100,\y*5);}; % scale y with 5 times \xo = \xo + 1; \yo = \y; }; {\draw (\x/100,0) -- node[below] {$\x$} (\x/100,-0.1);}; }; { \draw[->] (i) to node (w) [below] { \scriptsize \pgfkeys{/pgf/number format/.cd,showpos,fixed,fixed zerofill,precision=2,use period} $w = \pgfmathprintnumber{\w}$ } (n); \node(b) [below,xshift=5mm] at (n.south) { \scriptsize \pgfkeys{/pgf/number format/.cd,showpos,fixed,fixed zerofill,precision=2,use period} $b = \pgfmathprintnumber{\b}$ }; \node(o) [right=of n] { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} Output: $\pgfmathprintnumber{\a}$ }; \draw[->] (n) to (o); }; } \end{tikzpicture}% } % learn cost curve of a single sigmoid neutron with cross entropy cost function \newcommand{\crossEntropyCostLearning}[4]{ \begin{tikzpicture}[ inner sep=0pt, minimum size=10mm, font=\footnotesize, background rectangle/.style={ draw=gray!25, fill=gray!10, rounded corners }, show background rectangle] \coordinate (origin) at (0,0); \coordinate(x) at (3.5,0); \coordinate(y) at (0,2.5); \node(i) [above=4 of origin,xshift=-5mm] {Input: $1.0$}; \node(n) [right=2 of i,circle,draw] {}; \node(epoch) [right=of x,xshift=-1cm] {Epoch}; \node(cost) [left=of y,xshift=1cm] {Cost}; \draw[->] (origin) to (x); \draw[->] (origin) to (y); %\draw[blue,thick,domain=0:2] plot (\x, {(\x*\x / 2)}); \tikzmath{ % Do not contain blank line function sigmoid(\z) { return 1/(1 + exp(- \z)); }; function sigmoid_neutron(\w,\b) { return sigmoid(\w + \b); }; function cross_entropy_cost(\a) { % the quadratic cost function return -ln(1 - \a); }; function cross_entropy_cost_derivative(\a) { return 1/(1 - \a); }; \w = #1; % start weight \b = #2; % start bias \e = #3; % eta, learning rate \y = 0; \a = sigmoid_neutron(\w,\b); \dt = cross_entropy_cost_derivative(\a); \xo = 0; \yo = cross_entropy_cost(\a); integer \x; if #4 > 0 then { for \x in {1,...,#4}{ % epoches \a = sigmoid_neutron(\w,\b); \dt = cross_entropy_cost_derivative(\a); \w = \w - \e * \dt; \b = \b - \e * \dt; \y = cross_entropy_cost(\a); {\draw[blue,thick] (\xo/100,\yo/2) -- (\x/100,\y/2);}; % scale y to 1/2 \xo = \xo + 1; \yo = \y; }; {\draw (\x/100,0) -- node[below] {\footnotesize $\x$} (\x/100,-0.1);}; }; { \draw[->] (i) to node (w) [below] { \scriptsize \pgfkeys{/pgf/number format/.cd,showpos,fixed,fixed zerofill,precision=2,use period} $w = \pgfmathprintnumber{\w}$ } (n); \node(b) [below,xshift=5mm] at (n.south) { \scriptsize \pgfkeys{/pgf/number format/.cd,showpos,fixed,fixed zerofill,precision=2,use period} $b = \pgfmathprintnumber{\b}$ }; \node(o) [right=of n] { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} Output: $\pgfmathprintnumber{\a}$ }; \draw[->] (n) to (o); }; } \end{tikzpicture}% } % #1 - z1 % #2 - z2 % #3 - z3 % #4 - z4 \newcommand{\manipulateSoftmaxBars}[4]{ \begin{tikzpicture}[ font=\footnotesize, base/.style={rectangle,draw,minimum width=100pt,minimum height=10pt}, slidebar/.style={base,rounded corners=2pt}, slidebarinner/.style={rectangle,fill=gray!50,rounded corners=2pt,minimum height=10pt}, colorbar/.style={base}, colorbarinner/.style={rectangle,minimum height=10pt,fill=blue!60!cyan} ] \node(s1) [slidebar] {}; \node(z1) [below,anchor=north west] at (s1.south west) {$z^L_1 = #1$}; \node(b1) [colorbar,right=of s1] {}; %\node(a1) [below,anchor=north west] at (b1.south west) {$a^L_1 = 0.315$}; \node(s2) [slidebar,below=of s1] {}; \node(z2) [below,anchor=north west] at (s2.south west) {$z^L_2 = #2$}; \node(b2) [colorbar,right=of s2] {}; %\node(a2) [below,anchor=north west] at (b2.south west) {$a^L_2 = 0.009$}; \node(s3) [slidebar,below=of s2] {}; \node(z3) [below,anchor=north west] at (s3.south west) {$z^L_3 = #3$}; \node(b3) [colorbar,right=of s3] {}; %\node(a3) [below,anchor=north west] at (b3.south west) {$a^L_3 = 0.633$}; \node(s4) [slidebar,below=of s3] {}; \node(z4) [below,anchor=north west] at (s4.south west) {$z^L_4 = #4$}; \node(b4) [colorbar,right=of s4] {}; %\node(a4) [below,anchor=north west] at (b4.south west) {$a^L_4 = 0.043$}; \tikzmath{ function zsum(\za,\zb,\zc,\zd) { return exp(\za) + exp(\zb) + exp(\zc) + exp(\zd); }; function softmax(\n, \za, \zb, \zc, \zd) { return exp(\n) / zsum (\za, \zb, \zc, \zd); }; function getslidewidth(\x) { return (\x + 5) * 10; }; \a = softmax(#1, #1, #2, #3, #4); \wa = \a * 100; \wz = getslidewidth(#1); { \node(si1) [slidebarinner,minimum width=\wz pt,anchor=west] at (s1.west) {}; \node(bi1) [colorbarinner,right=of s1,minimum width=\wa pt] {}; \node(a1) [below,anchor=north west] at (b1.south west) {$a^L_1 = \a$}; }; \a = softmax(#2, #1, #2, #3, #4); \wa = \a * 100; \wz = getslidewidth(#2); { \node(si2) [slidebarinner,minimum width=\wz pt,anchor=west] at (s2.west) {}; \node(bi2) [colorbarinner,right=of s2,minimum width=\wa pt] {}; \node(a2) [below,anchor=north west] at (b2.south west) {$a^L_2 = \a$}; }; \a = softmax(#3, #1, #2, #3, #4); \wa = \a * 100; \wz = getslidewidth(#3); { \node(si3) [slidebarinner,minimum width=\wz pt,anchor=west] at (s3.west) {}; \node(bi3) [colorbarinner,right=of s3,minimum width=\wa pt] {}; \node(a3) [below,anchor=north west] at (b3.south west) {$a^L_3 = \a$}; }; \a = softmax(#4, #1, #2, #3, #4); \wa = \a * 100; \wz = getslidewidth(#4); { \node(si4) [slidebarinner,minimum width=\wz pt,anchor=west] at (s4.west) {}; \node(bi4) [colorbarinner,right=of s4,minimum width=\wa pt] {}; \node(a4) [below,anchor=north west] at (b4.south west) {$a^L_4 = \a$}; }; } \end{tikzpicture}% } % draw neurons and plots in chapter 4. % #1 - x weight % #2 - bias \newcommand{\manipulateTiGraph}[2]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node(n) [neuron] {}; \node(x) [neuron,left=1.25 of n,yshift=1.5cm] {$x$}; \node(y) [neuron,left=1.25 of n,yshift=-1.5cm] {$y$}; \draw[->] (x) -- node [blue,yshift=2mm,xshift=2mm] {$#1$} (n); \draw[->] (y) -- node [yshift=-2mm,xshift=2mm] {$0$} (n); \node [above,blue] at (n.north) {$#2$}; \draw[->] (n) -- ++(1cm, 0); \end{scope} \begin{scope}[xshift=2cm,yshift=-2.5cm] \begin{axis}[ view={-30}{15}, axis background/.style={fill=blue!5}, xlabel=$x$, ylabel=$y$, xtick distance=1, ytick distance=1, ztick distance=1, xtick={1}, ytick={1}, ztick={2}, title=Output, colormap={simple}{rgb255=(235,95,95) rgb255=(255,155,145)} ] \addplot3[surf,domain=0:1] { 1 / (1 + exp(-(#1) * x - (#2))) }; \end{axis} \end{scope} \end{tikzpicture}% } % #1 - x weight % #2 - bias \newcommand{\createTiGraphSurf}[2]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{axis}[ view={-30}{15}, axis background/.style={fill=blue!5}, xlabel=$x$, ylabel=$y$, xtick distance=1, ytick distance=1, ztick distance=1, xtick={1}, ytick={1}, ztick={2}, title={Output ($w_1 = #1, b = #2$)}, colormap={simple}{rgb255=(235,95,95) rgb255=(255,155,145)} ] \addplot3[surf,domain=0:1] { 1 / (1 + exp(-(#1) * x - (#2))) }; \end{axis} \end{tikzpicture}% } % #1 - weight % #2 - bias % #3 - title \newcommand{\manipulateSingleHiddenNeuron}[3]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node (l0) [neuron] {$x$}; \node (m0) [neuron,right=of l0,yshift=-1.5cm] {}; \node (m1) [neuron,right=of l0,yshift=1.5cm] {}; \node (r0) [neuron,right=of m0,yshift=1.5cm] {}; \draw[->] (r0) -- ++(1,0); \draw[->] (l0) to (m0); \draw[->] (l0) to node (w) [blue,above,xshift=-0.5cm] {$w = #1$} (m1); \draw[->] (m0) to (r0); \draw[->] (m1) to (r0); \node(b) [blue,above] at (m1.north) {$b = #2$}; \end{scope} \begin{scope}[xshift=6cm] \begin{axis}[ width=5.6cm, height=5.6cm, xlabel={\normalsize $x$}, axis lines=left, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, xtick distance=1, ytick distance=1, xmax=1.1, ymax=1.1, title={#3} ] \addplot[ orange, thick, domain=0:1, samples=101 ] { 1/(1 + exp(-(#1 * x + #2))) }; \end{axis} % \coordinate(o) at(0,0) node [left,xshift=1mm,yshift=-1mm] {\scriptsize $0$}; % % \draw[->] (o) -- ++(3.75,0); % \draw[->] (o) -- ++(0,3.75); % \coordinate[right=3.5 of o] (cx); % \coordinate[above=3.5 of o] (cy); % \draw (cx) -- ++(0, -0.075) node[below,yshift=1mm] {\scriptsize 1}; % \draw (cy) -- ++(-0.075, 0) node[left,xshift=1mm] {\scriptsize 1}; % % \node [below] at (1.75,0) {$x$}; % \node [above] at (1.75,3.5) {#3}; % % \draw[orange,domain=0:1,samples=101,xscale=3.5,yscale=3.5] % plot (\x, {(1/(1 + exp(-(#1 * \x + #2))))}); \end{scope} \end{tikzpicture}% } % This macro generate images by two_hn_network.tex, bump_function.tex in images folder, % to generate images used in chapter 4. % #1 - s1 % #2 - w1 % #3 - s2 % #4 - w2 \newcommand{\manipulateTwoHNNetwork}[4]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node (l0) [neuron] {$x$}; \node (m0) [neuron,right=of l0,yshift=-1.5cm] {}; \node (m1) [neuron,right=of l0,yshift=1.5cm] {}; \node (r0) [neuron,right=of m0,yshift=1.5cm] {}; \draw[->] (r0) -- ++(1,0); \draw[->] (l0) to (m0); \draw[->] (l0) to (m1); \draw[->] (m0) to node [blue,xshift=5mm,yshift=-4mm] {$w_2 = #4$} (r0); \draw[->] (m1) to node [blue,xshift=5mm,yshift=4mm] {$w_1 = #2$} (r0); \node[blue,above] at (m1.north) { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} $s_1 = \pgfmathprintnumber{#1}$ }; \node[blue,above] at (m0.north) { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} $s_2 = \pgfmathprintnumber{#3}$ }; \end{scope} \begin{scope}[xshift=6cm,yshift=-2.45cm] \begin{axis}[ width=5.6cm, height=7.6cm, % xlabel={\normalsize $x$}, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, axis x line=middle, axis y line=left, xtick distance=1, ytick distance=1, xmax=1.1, ymin=-1.5, ymax=2.1, title={}, declare function={ sigma(\z) = 1/(1 + exp(-\z)); f(\x,\st,\wt,\sb,\wb) = \wt * sigma(\x * 1000 - 1000 * \st) + \wb * sigma(\x * 1000 - 1000 * \sb); % f = w1 * a1 + w2 * a2 } ] \addplot[ orange, thick, domain=0:1, samples=401 ] { f(x, #1, #2, #3, #4) }; \end{axis} \end{scope} \end{tikzpicture}% } % This macro generate bump function by bump_fn.tex in images folder, % to generate images used in chapter 4. % #1 - s1 % #2 - s2 % #3 - h \newcommand{\manipulateBumpFunction}[3]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node (l0) [neuron] {$x$}; \node (m0) [neuron,right=of l0,yshift=-1.5cm] {}; \node (m1) [neuron,right=of l0,yshift=1.5cm] {}; \node (r0) [neuron,right=of m0,yshift=1.5cm] {}; \draw[->] (r0) -- ++(1,0); \draw[->] (l0) to (m0); \draw[->] (l0) to (m1); \draw[->] (m0) to node [xshift=2mm,yshift=-2mm] {$-#3$} (r0); \draw[->] (m1) to node [xshift=2mm,yshift=2mm] {$#3$} (r0); \node[blue] at (m1.center) { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} $\pgfmathprintnumber{#1}$ }; \node[blue] at (m0.center) { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} $\pgfmathprintnumber{#2}$ }; \node [blue,right=0.6cm of m1, yshift=4mm] {$h = #3$}; \end{scope} \begin{scope}[xshift=6cm,yshift=-2.45cm] \begin{axis}[ width=5.6cm, height=7.6cm, % xlabel={\normalsize $x$}, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, axis x line=middle, axis y line=left, xtick distance=1, ytick distance=1, xmax=1.1, ymin=-1.5, ymax=2.1, title={}, declare function={ sigma(\z) = 1/(1 + exp(-\z)); f(\x,\st,\wt,\sb,\wb) = \wt * sigma(\x * 1000 - 1000 * \st) + \wb * sigma(\x * 1000 - 1000 * \sb); % f = w1 * a1 + w2 * a2 } ] \addplot[ orange, thick, domain=0:1, samples=401 ] { f(x, #1, #3, #2, -#3) }; \end{axis} \end{scope} \end{tikzpicture}% } % This macro generate bump function by double_bump.tex in images folder, % to generate images used in chapter 4. % #1 - s1 % #2 - s2 % #3 - h1 % #4 - s3 % #5 - s4 % #6 - h2 \newcommand{\manipulateDoubleBump}[6]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node (l0) [neuron] {$x$}; \node (s2) [neuron,right=of l0,yshift=1.2cm] {}; \node (s3) [neuron,right=of l0,yshift=-1.2cm] {}; \node (s1) [neuron,above] at (s2.north) {}; \node (s4) [neuron,below] at (s3.south) {}; \node (r0) [neuron,right=of s2,yshift=-1.2cm] {}; \draw[->] (r0) -- ++(1,0); \draw[->] (l0) to (s1); \draw[->] (l0) to (s2); \draw[->] (l0) to (s3); \draw[->] (l0) to (s4); \draw[->] (s1) to node [blue,xshift=8mm,yshift=2mm] {$h = #3$} (r0); \draw[->] (s2) to (r0); \draw[->] (s3) to (r0); \draw[->] (s4) to node [blue,xshift=8mm,yshift=-2mm] {$h = #6$} (r0); \node[blue] at (s1.center) { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} $\pgfmathprintnumber{#1}$ }; \node[blue] at (s2.center) { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} $\pgfmathprintnumber{#2}$ }; \node[blue] at (s3.center) { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} $\pgfmathprintnumber{#4}$ }; \node[blue] at (s4.center) { \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=2,use period} $\pgfmathprintnumber{#5}$ }; \end{scope} \begin{scope}[xshift=6cm,yshift=-2.45cm] \begin{axis}[ width=5.6cm, height=7.6cm, % xlabel={\normalsize $x$}, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, axis x line=middle, axis y line=left, xtick distance=1, ytick distance=1, xmax=1.1, ymin=-1.5, ymax=2.1, title={}, declare function={ sigma(\z) = 1/(1 + exp(-\z)); f(\x,\st,\wt,\sb,\wb) = \wt * sigma(\x * 1000 - 1000 * \st) + \wb * sigma(\x * 1000 - 1000 * \sb); % f = w1 * a1 + w2 * a2 } ] \addplot[ orange, thick, domain=0:1, samples=401 ] { f(x, #1, #3, #2, -#3) + f(x, #4, #6, #5, -#6) }; \end{axis} \end{scope} \end{tikzpicture}% } \newcommand{\manipulateFiveBumps}[5]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node (l0) [neuron] {$x$}; \node (m0g0) [neuron,right=1.5 of l0,yshift=-5.5mm] {$0.6$}; \node (m1g0) [neuron,right=1.5 of l0,yshift=5.5mm] {$0.4$}; \node (r0) [neuron,right=1.5 of m0g0,yshift=5.5mm] {}; \node (m0g1) [neuron,above=0.4 of m1g0] {$0.4$}; \node (m1g1) [neuron,above=1mm] at (m0g1.north) {$0.2$}; \node (m1g2) [neuron,below=0.4 of m0g0] {$0.6$}; \node (m0g2) [neuron,below=1mm] at (m1g2.south) {$0.8$}; \node (m0g3) [circle,inner sep=0pt,minimum size=10mm,above=0.4 of m1g1] {$0.2$}; \node (m1g3) [neuron,above=1mm] at (m0g3.north) {$0.0$}; \node (m1g4) [circle,inner sep=0pt,minimum size=10mm,below=0.4 of m0g2] {$0.8$}; \node (m0g4) [neuron,below=1mm] at (m1g4.south) {$1.0$}; \foreach \x in {0,1} \foreach \y in {0,...,4} { \draw[->] (l0) to (m\x g\y); \draw[->] (m\x g\y) to (r0); } % cover the top and bottom neutrons for better look \node (m0g3a) [neuron,fill=white] at (m0g3) {$0.2$}; \node (m1g4a) [neuron,fill=white] at (m1g4) {$0.8$}; \draw[->] (r0) -- ++(1,0); \draw[->] (l0) to (m0g0); \draw[->] (l0) to (m1g0); \draw[->] (m0g0) to (r0); \draw[->] (m1g0) to (r0); \node [blue,above=4.15cm of r0,xshift=-1cm] {$h = #1$}; \node [blue,above=1.7cm of r0,xshift=-3mm] {$h = #2$}; \node [blue,above,xshift=5mm] at (r0.north) {$h = #3$}; \node [blue,below=1.7cm of r0,xshift=-3mm] {$h = #4$}; \node [blue,below=4.15cm of r0,xshift=-1cm] {$h = #5$}; \end{scope} \begin{scope}[xshift=7cm] \begin{axis}[ width=5.6cm, height=7.6cm, % xlabel={\normalsize $x$}, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, axis x line=middle, axis y line=left, xtick distance=1, ytick distance=1, xmax=1.1, ymin=-1.95, ymax=2.1, title={}, declare function={ sigma(\z) = 1/(1 + exp(-\z)); f(\x,\st,\wt,\sb,\wb) = \wt * sigma(\x * 1000 - 1000 * \st) + \wb * sigma(\x * 1000 - 1000 * \sb); % f = w1 * a1 + w2 * a2 } ] \addplot[ orange, thick, domain=0:1, samples=401 ] { f(x, 0.0, #1, 0.2, -#1) + f(x, 0.2, #2, 0.4, -#2) + f(x, 0.2, #3, 0.6, -#3) + f(x, 0.6, #4, 0.8, -#4) + f(x, 0.8, #5, 1.0, -#5) }; \end{axis} \end{scope} \end{tikzpicture}% } \newcommand{\manipulateDesignFunction}[5]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node (l0) [neuron] {$x$}; \node (m0g0) [neuron,right=1.5 of l0,yshift=-5.5mm] {$0.6$}; \node (m1g0) [neuron,right=1.5 of l0,yshift=5.5mm] {$0.4$}; \node (r0) [neuron,right=1.5 of m0g0,yshift=5.5mm] {}; \node (m0g1) [neuron,above=0.4 of m1g0] {$0.4$}; \node (m1g1) [neuron,above=1mm] at (m0g1.north) {$0.2$}; \node (m1g2) [neuron,below=0.4 of m0g0] {$0.6$}; \node (m0g2) [neuron,below=1mm] at (m1g2.south) {$0.8$}; \node (m0g3) [circle,inner sep=0pt,minimum size=10mm,above=0.4 of m1g1] {$0.2$}; \node (m1g3) [neuron,above=1mm] at (m0g3.north) {$0.0$}; \node (m1g4) [circle,inner sep=0pt,minimum size=10mm,below=0.4 of m0g2] {$0.8$}; \node (m0g4) [neuron,below=1mm] at (m1g4.south) {$1.0$}; \foreach \x in {0,1} \foreach \y in {0,...,4} { \draw[->] (l0) to (m\x g\y); \draw[->] (m\x g\y) to (r0); } % cover the top and bottom neutrons for better look \node (m0g3a) [neuron,fill=white] at (m0g3) {$0.2$}; \node (m1g4a) [neuron,fill=white] at (m1g4) {$0.8$}; \draw[->] (r0) -- ++(1,0); \draw[->] (l0) to (m0g0); \draw[->] (l0) to (m1g0); \draw[->] (m0g0) to (r0); \draw[->] (m1g0) to (r0); \node [blue,above=4.15cm of r0,xshift=-1cm] {$h = #1$}; \node [blue,above=1.7cm of r0,xshift=-3mm] {$h = #2$}; \node [blue,above,xshift=5mm] at (r0.north) {$h = #3$}; \node [blue,below=1.7cm of r0,xshift=-3mm] {$h = #4$}; \node [blue,below=4.15cm of r0,xshift=-1cm] {$h = #5$}; \end{scope} \begin{scope}[xshift=7cm] \begin{axis}[ width=5.6cm, height=7.6cm, % xlabel={\normalsize $x$}, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, axis x line=middle, axis y line=left, xtick distance=1, ytick distance=1, xmax=1.1, ymin=-2.6, ymax=3.1, title={}, declare function={ sigma(\z) = 1/(1 + exp(-\z)); f(\x,\st,\wt,\sb,\wb) = \wt * sigma(\x * 1000 - 1000 * \st) + \wb * sigma(\x * 1000 - 1000 * \sb); % f = w1 * a1 + w2 * a2 sigmaInverse(\z)=ln(\z/(1-\z)); g(\x)=0.2+0.4*\x*\x+0.3*\x*sin(15*deg(\x))+0.05*cos(50*deg(\x)); } ] \addplot[ orange, thick, domain=0:1, samples=501 ] { f(x, 0.0, #1, 0.2, -#1) + f(x, 0.2, #2, 0.4, -#2) + f(x, 0.2, #3, 0.6, -#3) + f(x, 0.6, #4, 0.8, -#4) + f(x, 0.8, #5, 1.0, -#5) }; \addplot[ blue!50, domain=0:1, samples=101 ] { sigmaInverse(g(x)) }; \end{axis} \end{scope} \end{tikzpicture}% } % #1 - weight % #2 - bias \newcommand{\manipulateRamping}[2]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node(x) [neuron] {$x$}; \node(n) [neuron,right=2 of x] {}; \draw[->] (n) -- ++(1,0); \draw[->] (x) to node (w) [blue,above] {$w = #1$} (n); \node(b) [blue,above] at (n.north) {$b = #2$}; \end{scope} \begin{scope}[xshift=5cm,yshift=-2cm] \begin{axis}[ width=6.1cm, height=6.1cm, xlabel={\normalsize $x$}, axis lines=left, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, xtick={0,1}, ytick={1}, xmax=1.1, ymax=1.1, % minor tick num=1, title={}, declare function={ f(\x,\w,\b) = 1/(1 + exp(-(\w * \x + (\b)))) + 0.2 * sin(10 * deg(\w * \x + (\b))) * exp(-abs(\w * \x + (\b))); } ] \addplot[ orange, thick, domain=0:1, samples=201 ] { f(x, #1, #2) }; \end{axis} \end{scope} \end{tikzpicture}% } % #1 - h % #2 - b \newcommand{\manipulateTowerConstruction}[2]{ \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node(n) [neuron] {}; \node(h0) [neuron,left=of n,yshift=1.2cm] {}; \node(h1) [neuron,above] at (h0.north) {}; \node(h2) [neuron,left=of n,yshift=-1.2cm] {}; \node(h3) [neuron,below] at (h2.south) {}; \node(x) [neuron,left=of h0,yshift=5mm] {$x$}; \node(y) [neuron,left=of h2,yshift=-5mm] {$y$}; \draw[->] (x) to (h0); \draw[->] (x) to (h1); \draw[->] (y) to (h2); \draw[->] (y) to (h3); \node (s0) at (h0.center) {$0.60$}; \node at (s0.north) {\tiny $x$}; \node (s1) at (h1.center) {$0.40$}; \node at (s1.north) {\tiny $x$}; \node (s2) at (h2.center) {$0.30$}; \node at (s2.north) {\tiny $y$}; \node (s3) at (h3.center) {$0.70$}; \node at (s3.north) {\tiny $y$}; \node [blue,right=4mm of h1] {$h = #1$}; \node [blue,above,yshift=2mm,xshift=2mm] at (n.north) {$b = #2$}; \draw[->] (h0) -- node [yshift=-2mm] {\scriptsize $-#1$} (n); \draw[->] (h1) -- node [yshift=2mm] {\scriptsize $#1$} (n); \draw[->] (h2) -- node [yshift=2mm] {\scriptsize $#1$} (n); \draw[->] (h3) -- node [yshift=-2mm] {\scriptsize $-#1$} (n); \draw[->] (n) -- ++(1cm, 0); \end{scope} \begin{scope}[xshift=2cm,yshift=-2.5cm] % FIXME: rotate the zlabel, change plot color, and move z axis to right \begin{axis}[ view={-30}{15}, axis background/.style={fill=blue!5}, xlabel=$x$, ylabel=$y$, xtick distance=1, ytick distance=1, ztick distance=1, xtick={1}, ytick={1}, ztick={2}, zmin=0, zmax=1, title=Output, colormap={simple}{rgb255=(235,95,95) rgb255=(255,155,145)}, declare function={ sigma(\z)=1/(1 + exp(-\z)); f(\x,\y,\h,\b)=sigma(\b + \h * (sigma(1000 * (\x - 0.4)) - sigma(1000 * (\x - 0.6))) + \h * (sigma(1000 * (\y - 0.3)) - sigma(1000 * (\y - 0.7)))); % f(x,y) = sigma(b + h * (sigma(1000*(x-0.4))-sigma(1000*(x-0.6))) + h*(sigma(1000*(y-0.3))-sigma(1000*(y-0.7)))); }] \addplot3[surf,domain=0:1] { f(x,y, #1, #2) }; \end{axis} \end{scope} \end{tikzpicture}% } % #1 - w1 % #2 - w2 \newcommand{\manipulateTwoTower}[2]{ \begin{tikzpicture}[ neuron/.style={circle,draw,fill=white,inner sep=0pt,minimum size=10mm}, invisible/.style={circle,inner sep=0pt,minimum size=10mm}, box/.style={rectangle,draw=gray,fill=gray!20,rounded corners=5pt,minimum width=3.5cm,minimum height=5.5cm} ] \begin{scope} \node(output) [neuron] {}; \node(box0) [box,left=of output,xshift=2.5mm,yshift=3cm] {}; \node(box1) [box,left=of output,xshift=2.5mm,yshift=-3cm] {}; \node(box0output) [neuron,left=of output,yshift=3cm] {}; \node(box0s1) [invisible,left=of box0output,yshift=1cm] {}; \node(box0s2) [neuron,left=of box0output,yshift=-1cm] {$0.8$}; \node(box0s0) [neuron,above] at (box0s1.north) {$0.1$}; \node(box0s3) [neuron,below] at (box0s2.south) {$0.9$}; \node(box1output) [neuron,left=of output,yshift=-3cm] {}; \node(box1s1) [neuron,left=of box1output,yshift=1cm] {$0.8$}; \node(box1s2) [invisible,left=of box1output,yshift=-1cm] {}; \node(box1s0) [neuron,above] at (box1s1.north) {$0.7$}; \node(box1s3) [neuron,below] at (box1s2.south) {$0.3$}; \node(x) [neuron,left=of box0s3] {$x$}; \node(y) [neuron,left=of box1s0] {$y$}; \foreach \x in {0,...,3} { \draw[->] (box0s\x) to (box0output); \draw[->] (box1s\x) to (box1output); } \draw[->] (x) to (box0s0); \draw[->] (x) to (box0s1); \draw[->] (x) to (box1s0); \draw[->] (x) to (box1s1); \draw[->] (y) to (box0s2); \draw[->] (y) to (box0s3); \draw[->] (y) to (box1s2); \draw[->] (y) to (box1s3); \node(box0s1a) [neuron] at (box0s1.center) {$0.2$}; \node(box1s2a) [neuron] at (box1s2.center) {$0.2$}; \draw[->] (box0output) -- node [blue,xshift=8mm] {$w = #1$} (output); \draw[->] (box1output) -- node [blue,xshift=8mm] {$w = #2$} (output); \draw[->] (output) -- ++(1cm, 0); \end{scope} \begin{scope}[xshift=2cm,yshift=-2.5cm] \begin{axis}[ view={-30}{15}, axis background/.style={fill=blue!5}, xlabel=$x$, ylabel=$y$, xtick distance=1, ytick distance=1, xtick={1}, ytick={1}, ztick={2}, title=, colormap={simple}{rgb255=(235,95,95) rgb255=(255,155,145)}, declare function={ sigma(\z)=1/(1 + exp(-\z)); f(\x,\y,\h,\b)= #1 * sigma(\b + \h * (sigma(1000 * (\x - 0.1)) - sigma(1000 * (\x - 0.2))) + \h * (sigma(1000 * (\y - 0.8)) - sigma(1000 * (\y - 0.9)))) + #2 * sigma(\b + \h * (sigma(1000 * (\x - 0.7)) - sigma(1000 * (\x - 0.8))) + \h * (sigma(1000 * (\y - 0.2)) - sigma(1000 * (\y - 0.3)))); }] \addplot3[surf,domain=0:1] { f(x,y,10,-16) }; \end{axis} \end{scope} \end{tikzpicture}% } ```
/content/code_sandbox/plots.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
11,852
```tex % file: title.tex \begin{titlepage} \begin{center} \hfill\\ \vspace{1cm} % title of this document {\fontsize{36pt}{40pt}\NotoSansSCBold{} }\\ \vspace{1em} {\LARGE\href{path_to_url}{Neural Networks and Deep Learning}}\\ \vspace{1cm} \includegraphics{cayley}\\ \vspace{1cm} {\LARGE \href{path_to_url}{Michael Nielsen} }\\ \vspace{1cm} {\Large \begin{tabular}{rl} \href{mailto:xhzhu.nju@gmail}{Xiaohu Zhu} & \multirow{2}{*}{} \\ \href{mailto:zhanggyb@gmail.com}{Freeman Zhang} & \\ \end{tabular} }\\ \vfill {\large \today}\\ \vspace{1em} {\large Version: \href{path_to_url}{0.5}} \end{center} \end{titlepage} ```
/content/code_sandbox/title.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
256
```tex % file: westernfonts.tex \newfontfamily\SourceCodePro{SourceCodePro}[ UprightFont=*-Light, BoldFont=*-Medium, ItalicFont=*-LightIt, BoldItalicFont=*-MediumIt] \newfontfamily\SourceSerifPro{SourceSerifPro}[ UprightFont=*-Light, BoldFont=*-Semibold] \newcommand{\serif}[0]{\SourceSerifPro} \setmonofont{SourceCodePro}[ UprightFont=*-Light, BoldFont=*-Medium, ItalicFont=*-LightIt, BoldItalicFont=*-MediumIt] ```
/content/code_sandbox/westernfonts.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
150
```tex % file: history.tex \chapter{} \begin{table}[h] \centering \begin{tabularx}{0.9\textwidth}{ r X } \toprule \textbf{} & \textbf{}\\ \midrule 2017-04-09 & \vspace{-1.5ex} \begin{compactitem} \item Version 0.5 \item \href{path_to_url#serif-hans}{} \item glossaries chapter, section gls \item \href{mailto:gengchao@foxmail.com}{GC555} \item \href{path_to_url}{1.6 } \end{compactitem}\\ \midrule 2016-11-25 & Version 0.4: \\ \midrule 2016-08-08 & Version 0.3: Tex2016 \\ \midrule 2016-05-17 & Version 0.2: \\ \midrule 2016-04-16 & Version 0.1.1 \href{mailto:xhzhu.nju@gmail}{Xiaohu Zhu} \\ \midrule 2016-03-22 & Version 0.1\\ % \midrule % \today & Version 1.0. Initial Release.\\ \bottomrule \end{tabularx} \caption{} \label{table:DocumentChanges} \end{table} ```
/content/code_sandbox/history.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
358
```tex % file: localization.tex % load cjkfonts and set Source Han Sans SC as the default CJK fonts: \usepackage[default]{cjkfonts} \usepackage{titlesec} \titleformat{\chapter}[display] {\bfseries\huge}% {\huge \thechapter{} }% {10 pt}% {\bfseries\huge}% \renewcommand{\contentsname}{} \renewcommand{\indexname}{} % Redefine \emph to be both bold and italic, better in chinese document % \let\emph\relax %\DeclareTextFontCommand{\emph}{\bfseries\em} % bold and italic % \DeclareTextFontCommand{\emph}{\bfseries} % just bold \usepackage{indentfirst} ```
/content/code_sandbox/localization.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
174
```tex % file: about.tex \chapter{} \label{ch:About} 2006 2006``'' ``'' Facebook \section*{} \label{sec:PrincipleOrientedApproach} ``''------ \section*{} \label{sec:HandsOnApproach} Python2.7Python \href{path_to_url}{} \hyperref[ch:HowTheBackpropagationAlgorithmWorks]{} \hyperref[ch:HowTheBackpropagationAlgorithmWorks]{} % \href{path_to_url#the_backpropagation_algorithm}{ } ```
/content/code_sandbox/about.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
125
```tex % file: chap4.tex \chapter{} \label{ch:VisualProof} $f(x)$ \begin{center} \includegraphics{function} \end{center} \label{basic_network_precursor} $x$ $f(x)$ \begin{center} \includegraphics{basic_network} \end{center} $f = f(x_1, \ldots, x_m)$ $m = 3$ $n = 2$ \begin{center} \includegraphics{vector_valued_network} \end{center} \textbf{} \footnote{\href{path_to_url~gvc/Cybenko_MCSS.pdf}{Approximation by superpositions of a sigmoidal function} George Cybenko (1989) Cybenko \href{path_to_url}{Multilayer feedforward networks are universal approximators} Kurt Hornik Maxwell Stinchcombe Halbert White (1989) Stone-Weierstrass }\href{path_to_url }{}\href{path_to_url}{ } \footnote{} mp4 \footnote{} \section{} \label{sec:two_caveats} \textbf{} \textbf{} \hyperref[basic_network_precursor]{} $f(x)$ \begin{center} \includegraphics{bigger_network} \end{center} $\epsilon > 0$ $f(x)$ $g(x)$ $x$ $|g(x) - f(x)| < \epsilon$ \textbf{} \section{} \label{sec:universality_with_one_input_and_one_output} \begin{center} \includegraphics{function} \end{center} $f$ \begin{center} \includegraphics{two_hidden_neurons} \end{center} $w$ $b$ \begin{center} \includegraphics{basic_manipulation} \end{center} \hyperref[sec:sigmoid_neurons]{} $\sigma(wx + b)$ $\sigma(z) \equiv 1/(1+e^{-z})$ S S\footnote{ } $b$ $2$ $3$ $w = 100$ $x = 0.3$ \begin{center} \includegraphics{create_step_function} \end{center} $w = 999$ \begin{center} \includegraphics{high_weight_function} \end{center} S S $w$ $x$ $w$ $b$ $b$ \textbf{} $w$ \textbf{} $s = -b/w$ \begin{center} \includegraphics{step} \end{center} $s$ $s = -b/w$ $s$ \begin{center} \includegraphics{step_parameterization} \end{center} $w$ ~~ $b = -ws$ $s_1$ $s_2$ $w_1$ $w_2$ \begin{center} \includegraphics{two_hn_network} \end{center} \textbf{} $w_1 a_1 + w_2 a_2$ $a_1$ $a_2$ \footnote{ $\sigma(w_1 a_1+w_2 a_2 + b)$ $b$ } $a$ \textbf{}\textbf{activations} $s_1$ $s_1$ $s_2$ $s_2$ 0 $w_1$ $0.8$$w_2$ $-0.8$ $s_1$ $s_2$ $0.8$ \begin{center} \includegraphics{bump_function} \end{center} $h$ $s_1 = \ldots$$w_1 = \ldots$ \begin{center} \includegraphics{bump_fn} \end{center} $h$ {\serif if-then-else} \begin{lstlisting}[language=Python] if input >= step point: add 1 to the weighted output else: add 0 to the weighted output \end{lstlisting} {\serif if-then-else} \begin{center} \includegraphics{double_bump} \end{center} $h$ $h$ $[0, 1]$ $N$ $N$ $N = 5$ \begin{center} \includegraphics{five_bumps} \end{center} $0, 1/5$ $1/5, 2/5$ $4/5, 5/5$ $h$ $h$ $-h$ $h$ \textbf{} $h$ $+h$ $-h$ $h$ \begin{center} \includegraphics{function} \end{center} \begin{equation} f(x) = 0.2+0.4 x^2+0.3x \sin(15 x) + 0.05 \cos(50 x) \label{eq:113}\tag{113} \end{equation} $x$ $0$ $1$$y$ $0$ $1$ $\sum_j w_j a_j$ $\sigma(\sum_j w_j a_j + b)$ $b$ $\sigma^{-1} \circ f(x)$ $\sigma^{-1}$ $\sigma$ \begin{center} \includegraphics{inverted_function} \end{center} $f(x)$ \footnote{ $0$} % \href{path_to_url#universality_with_one_input_and_one_output}{% } \textbf{}\textbf{} $0.40$ $h$ $0.40$ \begin{center} \href{path_to_url#universality_with_one_input_and_one_output}{\includegraphics{design_function}} \end{center} \begin{center} \includegraphics{design_function_success} \end{center} $f(x)$ $w = 1000$ $b = -w s$ $s = 0.2$ $b = -1000 \times 0.2 = -200$ $h$ $h$$h = -0.5$ $-0.5$ $0.5$ $0$ $f(x) = 0.2+0.4 x^2+0.3 \sin(15 x) + 0.05 \cos(50 x)$ $[0, 1]$ $[0, 1]$ \section{} \label{sec:many_input_variables} \begin{center} \includegraphics{two_inputs} \end{center} $x$ $y$ $w_1$ $w_2$ $b$ $w_2$ $0$ $w_1$ $b$ \begin{center} \includegraphics{ti_graph} \end{center} $w_2 = 0$ $y$ $x$ $w_1$ $w_1 = 100$ $w_2$ $0$ \begin{center} \begin{tabular}{c c} \includegraphics{ti_graph-0} & \includegraphics{ti_graph-1}\\ \includegraphics{ti_graph-2} & \includegraphics{ti_graph-3}\\ \includegraphics{ti_graph-4} & \\ \end{tabular} \end{center} $s_x \equiv -b / w_1$ \begin{center} \includegraphics{ti_graph_redux} \end{center} $x$ ~~ $w1 = 1000$~~ $w_2 = 0$ $x$ $x$ $y$ $w_2 = 1000$$x$ $0$ $w_1 = 0$ $y$ \begin{center} \includegraphics{y_step} \end{center} $y$ $y$ $x$ $y$ $y$ $y$ $x$ $0$ $x$ $h$ $-h$ $h$ \begin{center} \includegraphics{bump_3d} \end{center} $h$ $0.30$ $0.70$ $x$ $y$ $y$ $y$ $x$ $0$ \begin{center} \includegraphics{bump_3d_y} \end{center} $y$ $y$ $x$ $y$ $x$ $0$ $x$ $y$ $h$ \begin{center} \includegraphics{xy_bump} \end{center} $0$ $x$ $y$ $h$ $x$ $y$ \textbf{} \begin{center} \includegraphics{tower} \end{center} \begin{center} \includegraphics{many_towers} \end{center} $2h$ $h$ {\serif if-then-else} \begin{lstlisting}[language=Python] if input >= threshold: output 1 else: output 0 \end{lstlisting} \begin{lstlisting}[language=Python] if combined output from hidden neurons >= threshold: output 1 else: output 0 \end{lstlisting} ~~$3h/2$ S $h$ $b$ 1{\serif if-then-else} $h$ $-h$2$b$ {\serif if-then-else} \begin{center} \includegraphics{tower_construction} \end{center} $h$ {\serif if-then-else} $b \approx -3h/2$ $h = 10$ \begin{center} \includegraphics{tower_construction_2} \end{center} $h$ $h$ $b = -3h/2$ \textbf{} \begin{center} \includegraphics{the_two_towers} \end{center} \begin{center} \includegraphics{many_towers_2} \end{center} $\sigma^{-1} \circ f$ $f$ $x_1, x_2, x_3$ \begin{center} \includegraphics{tower_n_dim} \end{center} $x_1, x_2, x_3$ $s_1, t_1$ ~~ $s_1, t_1, s_2, \ldots$ $+h, -h$ $h$ $-5h/2$ $x_1$ $s_1$ $t_1$ $x_2$ $s_2$ $t_2$ $x_3$ $s_3$ $t_3$ $1$ $0$ $1$ $0$ $m$ $(-m+1/2)h$ % $f(x_1, \ldots, x_m) \in R^n$ $n$ $f^1(x_1, \ldots, x_m)$ $f^2(x_1, \ldots, x_m)$ $f^1$ $f^2$ \subsection*{} \begin{itemize} \item a $x$ $y$ ba c c\hyperref[sec:fixing_up_the_step_functions]{} \end{itemize} \section{S } \label{sec:extension_beyond_sigmoid_neurons} S S $x_1, x_2, \ldots$ $\sigma(\sum_j w_j x_j + b)$ $w_j$ $b$ $\sigma$ S \begin{center} \includegraphics{sigmoid} \end{center} $s(z)$ \begin{center} \includegraphics{sigmoid_like} \end{center} $x_1, x_2, \ldots$ $w_1, w_2, \ldots$ $b$ $s(\sum_j w_j x_j + b)$ S \begin{center} \includegraphics{ramping} \end{center} $w = 100$ \begin{center} \includegraphics{create_ramping} \end{center} S $s(z)$ $s(z)$ $z \rightarrow -\infty$ $z \rightarrow \infty$ $s(z)$ \subsection*{} \begin{itemize} \item \hyperref[subsec:other_models_of_artificial_neuron]{} \item $s(z) = z$ \end{itemize} \section{} \label{sec:fixing_up_the_step_functions} \begin{center} \includegraphics{failure} \end{center} ~~ $f$ $\sigma^{-1} \circ f(x)$ \begin{center} \includegraphics{inverted_function_2} \end{center} \begin{center} \includegraphics{series_of_bumps} \end{center} $\sigma^{-1} \circ f(x)$ $\sigma^{-1} \circ f(x) / 2$ \begin{center} \includegraphics{half_bumps} \end{center} $\sigma^{-1} \circ f(x) / 2$ \begin{center} \includegraphics{shifted_bumps} \end{center} $\sigma^{-1} \circ f(x) / 2$ $\sigma^{-1} \circ f(x)$ $2$ $M$ $\sigma^{-1} \circ f(x) / M$ $M$ \section{} \label{sec:conclusion} {\serif NAND} \textbf{} % \hyperref[sec:toward_deep_learning]{} \footnote{ \textbf{} Jen Dodd Chris Olah Chris Mike BostockAmit PatelBret Victor Steven Wittens} ```
/content/code_sandbox/chap4.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
3,186
```tex % file: exercises_and_problems.tex \chapter{} \label{chap:ExercisesAndProblems} ```
/content/code_sandbox/exercises_and_problems.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
26
```tex % file: chap6.tex \chapter{} \label{ch:Deeplearning} \hyperref[ch:WhyHardToTrain]{} \hyperref[sec:convolutional_networks]{} MNIST \begin{center} \includegraphics[width=64pt]{digits} \end{center} \gls*{pooling} GPU \gls*{overfitting}\gls*{dropout} \gls*{overfitting} 10,000 MNIST ~~ ~~ 9,967 33 \begin{center} \includegraphics[width=.75\textwidth]{ensemble_errors} \end{center} 9 8 8 9 \gls*{rnn}\gls*{lstm} \gls*{idui} \gls*{bp}\gls*{regularization}\gls*{softmax-func} MNIST \section{} \label{sec:convolutional_networks} \begin{center} \includegraphics[width=64pt]{digits} \end{center} \begin{center} \includegraphics{tikz41} \end{center} $28 \times 28$ 784$= 28 \times 28$ \gls*{weight}\gls*{bias}~~~~ '0', '1', '2', $\ldots$, '8', '9' \hyperref[98percent]{ 98\% } \hyperref[sec:learning_with_gradient_descent]{MNIST } \textbf{} \textbf{\gls{cnn}}\footnote{\gls*{cnn} 1970 1998 \href{path_to_url}{Gradient-based learning applied to document recognition} Yann LeCun Lon Bottou Yoshua Bengio Patrick HaffnerLeCun \gls*{cnn} \gls*{regularization} \gls*{cnn} } \gls*{cnn}\textbf{\gls{lrf}}\textbf{\gls{shared-weights}} \textbf{\gls{pooling}}\\ \textbf{\gls*{lrf}} $28 \times 28$ $28 \times 28$ \begin{center} \includegraphics{tikz42} \end{center} \gls*{hidden-layer} $5 \times 5$ 25 \begin{center} \includegraphics{tikz43} \end{center} \textbf{\gls*{lrf}} \gls*{weight}\gls*{bias} \gls*{lrf} \gls*{lrf}\gls*{lrf}\gls*{hidden-layer} \gls*{lrf} \begin{center} \includegraphics{tikz44} \end{center} \gls*{lrf} \begin{center} \includegraphics{tikz45} \end{center} \gls*{hidden-layer} $28 \times 28$ $5 \times 5$ \gls*{lrf}\gls*{hidden-layer} $24 \times 24$ \gls*{lrf} 23 23 \gls*{lrf}\textbf{} $2$ \gls*{lrf} $2$ $1$ \footnote{ % \hyperref[sec:how_to_choose_a_neural_network's_hyper-parameters]{} \gls*{lrf}~~ $5 \times 5$ % \gls*{lrf} $28 \times 28$ MNIST \gls*{lrf}}\\ \textbf{\gls*{shared-weights}\gls*{bias}} \gls*{bias} \gls*{lrf} $5 \times 5$ \gls*{weight} $24 \times 24$ \textbf{}\gls*{weight}\gls*{bias} $j, k$ \begin{equation} \sigma\left(b + \sum_{l=0}^4 \sum_{m=0}^4 w_{l,m} a_{j+l, k+m} \right) \label{eq:125}\tag{125} \end{equation} $\sigma$ ~~ \hyperref[sec:sigmoid_neurons]{\gls*{sigmoid-func}}$b$ \gls*{bias} $w_{l,m}$ \gls*{weight} $5 \times 5$ $a_{x, y}$ $x, y$ \gls*{hidden-layer}\footnote{ } \gls*{weight}\gls*{bias} \gls*{lrf} \footnote{ MNIST MNIST } \gls*{hidden-layer}\textbf{} \gls*{weight}\textbf{\gls*{shared-weights}} \gls*{bias}\textbf{\gls*{bias}}\gls*{shared-weights}\gls*{bias}% \textbf{}\textbf{} \begin{center} \includegraphics{tikz46} \end{center} 3 $5 \times 5$ \gls*{shared-weights}\gls*{bias} 3 3 MNIST LeNet-5 6 $5 \times 5$ \gls*{lrf} LeNet-5 20 40 \footnote{ \hyperref[final_conv]{}} \begin{center} \includegraphics[width=.65\textwidth]{net_full_layer_0} \end{center} 20 20 $5 \times 5$ \gls*{lrf} $5 \times 5$ \gls*{weight} \gls*{weight} \gls*{weight} \href{path_to_url}{Gabor } Matthew Zeiler Rob Fergus 2013 \href{path_to_url}{Visualizing and Understanding Convolutional Networks} \gls*{shared-weights}\gls*{bias} $25 = 5 \times 5$ \gls*{shared-weights} \gls*{bias} $26$ $20$ $20 \times 26 = 520$ $784 = 28 \times 28$ $30$ $784 \times 30$ \gls*{weight} $30$ \gls*{bias} $23,550$ $40$ \textbf{}\textit{convolutional}~\eqref{eq:125} \textbf{}\textit{convolution} $a^1 = \sigma(b + w * a^0)$ $a^1$ $a^0$ $*$ \\ \textbf{\gls*{pooling}} \gls*{cnn}% \textbf{\gls*{pooling}}\textit{pooling layers}\gls*{pooling} \gls*{pooling}\footnote{ } \gls*{pooling} $2 \times 2$ \gls*{pooling} \textbf{}\textit{max-pooling}\gls*{pooling} \gls*{pooling} $2 \times 2$ \begin{center} \includegraphics{tikz47} \end{center} $24 \times 24$ \gls*{pooling} $12 \times 12$ \gls*{pooling} % \gls*{pooling} \begin{center} \includegraphics{tikz48} \end{center} \gls*{pooling} \gls*{pooling} \gls*{pooling}\gls*{pooling} \textbf{L2 \gls*{pooling}} $2 \times 2$ \gls*{pooling}L2 \gls*{pooling} \gls*{pooling} \gls*{pooling} \\ \textbf{} $10$ $10$ MNIST '0''1''2' \begin{center} \includegraphics{tikz49} \end{center} $28 \times 28$ MNIST $5 \times 5$ \gls*{lrf} $3$ $3 \times 24 \times 24$ % \gls*{pooling} $2 \times 2$ $3$ $3 \times 12 \times 12$ \gls*{pooling}% \textbf{} \gls*{weight}\gls*{bias} \gls*{weight}\gls*{bias} \gls*{sgd}\gls*{bp} \gls*{bp} \hyperref[ch:HowThebackpropagationalgorithmworks]{\gls*{bp} }\gls*{pooling} \hyperref[ch:HowThebackpropagationalgorithmworks]{ } \subsection*{} \begin{itemize} \item \textbf{\gls*{bp}}\quad \gls*{bp} \eqref{eq:bp1}--\eqref{eq:bp4}\hyperref[backpropsummary]{} \gls*{pooling} \gls*{bp} \end{itemize} \section{} \label{seq:convolutional_neural_networks_in_practice} \gls*{cnn} MNIST \lstinline!network3.py! \lstinline!network.py! \lstinline!network2.py! \footnote{ \lstinline!network3.py! Theano \gls*{cnn} \href{path_to_url}{LeNet-5} Misha Denil \href{path_to_url}{} \href{path_to_url}{Chris Olah} } \href{path_to_url}{GitHub} \lstinline!network3.py! \lstinline!network3.py! \lstinline!network.py! \lstinline!network2.py! Python Numpy \gls*{bp}\gls*{sgd} \lstinline!network3.py! \href{path_to_url}{Theano} \footnote{ \href{path_to_url~lisa/pointeurs/theano_scipy2010.pdf}{Theano: A CPU and GPU Math Expression Compiler in Python} James Bergstra Olivier Breuleux Frederic Bastien Pascal Lamblin Ravzan Pascanu Guillaume Desjardins Joseph Turian David Warde-Farley Yoshua Bengio 2010 Theano \href{path_to_url}{Pylearn2} \href{path_to_url}{Keras} \href{path_to_url}{Caffe} \href{path_to_url}{Torch}} Theano \gls*{cnn}% \gls*{bp}Theano Theano CPU GPU GPU Theano% \href{path_to_url}{} Theano Theano 0.6\footnote{Theano 0.7 Theano 0.7 } GPU Mac OS X Yosemite NVIDIA GPU Ubuntu 14.04 \lstinline!networks3.py! \lstinline!networks3.py! \lstinline!GPU! \lstinline!True! \lstinline!False! Theano GPU % \href{path_to_url}{ } Google Theano GPU \href{path_to_url}{Amazon Web Services} EC2 G2 GPU CPU CPU\\gls*{epoch} \gls*{hidden-layer} $100$ 60 \gls*{epoch}\gls*{learning-rate}$\eta = 0.1$\gls*{mini-batch} $10$\gls*{regularization} \footnote{% \href{path_to_url}{% }} \begin{lstlisting}[language=Python] >>> import network3 >>> from network3 import Network >>> from network3 import ConvPoolLayer, FullyConnectedLayer, SoftmaxLayer >>> training_data, validation_data, test_data = network3.load_data_shared() >>> mini_batch_size = 10 >>> net = Network([ FullyConnectedLayer(n_in=784, n_out=100), SoftmaxLayer(n_in=100, n_out=10)], mini_batch_size) >>> net.SGD(training_data, 60, mini_batch_size, 0.1, validation_data, test_data) \end{lstlisting} $97.80$\% \lstinline!test_data! \gls*{epoch}\lstinline!validation_data! \gls*{overfitting}\hyperref[validation_explanation]{ }\gls*{weight}\gls*{bias} \footnote{ } $97.80$\% \hyperref[chap3_98_04_percent]{} $98.04$\% $100$ \gls*{hidden-layer} $60$ \gls*{epoch}\gls*{mini-batch} $10$\gls*{learning-rate} $\eta = 0.1$ % \hyperref[sec:overfitting_and_regularization]{\gls*{regularization}} \gls*{overfitting}\gls*{regularization} % \gls*{regularization}S \gls*{softmax}% \hyperref[subsec:softmax]{} ~~\gls*{softmax}\gls*{log-likelihood} $5 \times 5$ $1$$20$ \gls*{pooling} $2 \times 2$ \gls*{pooling} \begin{center} \includegraphics{simple_conv} \end{center} \gls*{pooling}% \gls*{lrf} \footnote{ $10$ \gls*{mini-batch}\hyperref[mini_batch_size]{} \gls*{mini-batch}\gls*{mini-batch} } \begin{lstlisting}[language=Python] >>> net = Network([ ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_shape=(20, 1, 5, 5), poolsize=(2, 2)), FullyConnectedLayer(n_in=20*12*12, n_out=100), SoftmaxLayer(n_in=100, n_out=10)], mini_batch_size) >>> net.SGD(training_data, 60, mini_batch_size, 0.1, validation_data, test_data) \end{lstlisting} $98.78$\% \gls*{pooling} \lstinline!network3.py! \lstinline!network3.py! \lstinline!network3.py! \subsection*{} \begin{itemize} \item --\gls*{pooling}\gls*{softmax} \end{itemize} $98.78$\% --\gls*{pooling}--\gls*{pooling} \gls*{hidden-layer} $5 \times 5$ \gls*{lrf}\gls*{pooling} $2 \times 2$ \gls*{hyper-params} \begin{lstlisting}[language=Python] >>> net = Network([ ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_shape=(20, 1, 5, 5), poolsize=(2, 2)), ConvPoolLayer(image_shape=(mini_batch_size, 20, 12, 12), filter_shape=(40, 20, 5, 5), poolsize=(2, 2)), FullyConnectedLayer(n_in=40*4*4, n_out=100), SoftmaxLayer(n_in=100, n_out=10)], mini_batch_size) >>> net.SGD(training_data, 60, mini_batch_size, 0.1, validation_data, test_data) \end{lstlisting} $99.06$\% --\gls*{pooling} --\gls*{pooling} $12 \times 12$ --\gls*{pooling} $20$ --\gls*{pooling} $20 \times 20 \times 12$ $20$ --\gls*{pooling} --\gls*{pooling}--\gls*{pooling} % \gls*{lrf}\textbf{} $20 \times 5 \times 5$ --\gls*{pooling}\textbf{} \gls*{lrf}\footnote{ 3 % \gls*{lrf}} \subsection*{} \begin{itemize} \item \textbf{\gls*{tanh}}\quad % \hyperref[subsec:other_models_of_artificial_neuron]{\gls*{tanh-func}} \gls*{sigmoid-func} S \gls*{tanh} \gls*{tanh}\footnote{ \lstinline!activation_fn=tanh! \lstinline!ConvPoolLayer! \lstinline!FullyConnectedLayer! } S $20$ \gls*{epoch} $60$ $60$ \gls*{epoch}\gls*{tanh} S \gls*{epoch} $60$ \gls*{epoch} \gls*{tanh} \gls*{tanh} S \gls*{learning-rate}\footnote{ $\sigma(z) = (1+\tanh(z/2))/2$ } \gls*{tanh} S \textbf{ \gls*{tanh} \gls*{tanh}} \end{itemize} \textbf{\gls*{relu}} 1998 \footnote{\href{path_to_url}{"Gradient-based learning applied to document recognition"} Yann LeCun Lon Bottou Yoshua Bengio Patrick Haffner 1998 } LeNet-5 MNIST % \hyperref[sec:other_models_of_artificial_neuron]{} S $f(z) \equiv \max(0, z)$ $60$ % \gls*{epoch}\gls*{learning-rate}$\eta = 0.03$ \hyperref[sec:overfitting_and_regularization]{L2 \gls*{regularization}} \gls*{regularization} $\lambda = 0.1$ \begin{lstlisting}[language=Python] >>> from network3 import ReLU >>> net = Network([ ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_shape=(20, 1, 5, 5), poolsize=(2, 2), activation_fn=ReLU), ConvPoolLayer(image_shape=(mini_batch_size, 20, 12, 12), filter_shape=(40, 20, 5, 5), poolsize=(2, 2), activation_fn=ReLU), FullyConnectedLayer(n_in=40*4*4, n_out=100, activation_fn=ReLU), SoftmaxLayer(n_in=100, n_out=10)], mini_batch_size) >>> net.SGD(training_data, 60, mini_batch_size, 0.03, validation_data, test_data, lmbda=0.1) \end{lstlisting} 99.23\% S 99.06 S S \gls*{tanh} \footnote{ $\max(0, z)$ $z$ S \hyperref[saturation]{} } \\ \textbf{} shell \lstinline!expand_mnist.py! \footnote{\lstinline!expand_mnist.py! % \href{path_to_url}{% }} \input{snippets/run_expand_mnist} % move to separate file to avoid syntax error caused by '$' in EMACS. $50,000$ MNIST $250,000$ \gls*{epoch} ~~ $5$ \gls*{overfitting} $60$ \gls*{epoch} \begin{lstlisting}[language=Python] >>> expanded_training_data, _, _ = network3.load_data_shared( "../data/mnist_expanded.pkl.gz") >>> net = Network([ ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_shape=(20, 1, 5, 5), poolsize=(2, 2), activation_fn=ReLU), ConvPoolLayer(image_shape=(mini_batch_size, 20, 12, 12), filter_shape=(40, 20, 5, 5), poolsize=(2, 2), activation_fn=ReLU), FullyConnectedLayer(n_in=40*4*4, n_out=100, activation_fn=ReLU), SoftmaxLayer(n_in=100, n_out=10)], mini_batch_size) >>> net.SGD(expanded_training_data, 60, mini_batch_size, 0.03, validation_data, test_data, lmbda=0.1) \end{lstlisting} 99.37\% % \hyperref[sec:other_techniques_for_regularization]{} 2003 SimardSteinkraus Platt\footnote{\href{path_to_url}{Best Practices for Convolutional Neural Networks Applied to Visual Document Analysis} Patrice Simard Dave Steinkraus John Platt 2003} MNIST $99.6$\%--\gls*{pooling} $100$ ~~ ~~ MNIST $99.6$\% \subsection*{} \begin{itemize} \item \end{itemize} \textbf{} $300$ $1,000$ $99.46$\% $99.43$\%99.37\% $100$ \begin{lstlisting}[language=Python] >>> net = Network([ ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_shape=(20, 1, 5, 5), poolsize=(2, 2), activation_fn=ReLU), ConvPoolLayer(image_shape=(mini_batch_size, 20, 12, 12), filter_shape=(40, 20, 5, 5), poolsize=(2, 2), activation_fn=ReLU), FullyConnectedLayer(n_in=40*4*4, n_out=100, activation_fn=ReLU), FullyConnectedLayer(n_in=100, n_out=100, activation_fn=ReLU), SoftmaxLayer(n_in=100, n_out=10)], mini_batch_size) >>> net.SGD(expanded_training_data, 60, mini_batch_size, 0.03, validation_data, test_data, lmbda=0.1) \end{lstlisting} 99.43\% $300$ $1,000$ $99.48$\% $99.47$\% \label{final_conv} MNIST \gls*{regularization}% \gls*{overfitting}% \hyperref[sec:other_techniques_for_regularization]{} \begin{lstlisting}[language=Python] >>> net = Network([ ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28), filter_shape=(20, 1, 5, 5), poolsize=(2, 2), activation_fn=ReLU), ConvPoolLayer(image_shape=(mini_batch_size, 20, 12, 12), filter_shape=(40, 20, 5, 5), poolsize=(2, 2), activation_fn=ReLU), FullyConnectedLayer( n_in=40*4*4, n_out=1000, activation_fn=ReLU, p_dropout=0.5), FullyConnectedLayer( n_in=1000, n_out=1000, activation_fn=ReLU, p_dropout=0.5), SoftmaxLayer(n_in=1000, n_out=10, p_dropout=0.5)], mini_batch_size) >>> net.SGD(expanded_training_data, 40, mini_batch_size, 0.03, validation_data, test_data) \end{lstlisting} $99.60$\% $100$ $99.37$\% \gls*{epoch} $40$\gls*{overfitting} \gls*{hidden-layer} $1,000$ $100$ $300$ $1,000$ $1,000$ \\ \textbf{} $5$ $99.6$\% $5$ 99.67\% $33$ $10,000$ NMIST \begin{center} \includegraphics[width=.75\textwidth]{ensemble_errors} \end{center} 6 5 6 0 5 3 8 9 6 9,967 \\ \textbf{} \gls*{overfitting} \gls*{shared-weights} \gls*{regularization}\\ \textbf{} MNIST Rodrigo Benenson % \href{path_to_url}{% } CireanMeier Gambardella Schmidhuber 2010 \footnote{\href{path_to_url}{Deep, Big, Simple Neural Nets Excel on Handwritten Digit Recognition} Dan Claudiu Cirean Ueli MeierLuca Maria Gambardella Jrgen Schmidhuber 2010} $2,500$$2,000$$1,500$$1,000$ $500$ \gls*{hidden-layer} Simard 80 MNIST 99.65\% GPU \gls*{epoch} \gls*{learning-rate} $10^{-3}$ $10^{-6}$ \\ \textbf{} \hyperref[ch:WhyHardToTrain]{} 12 \gls*{regularization}\gls*{overfitting} 3 S ~~ $3$--$5$ 4 GPU $40$ \gls*{epoch} $5$ MNIST $30$ \gls*{epoch}3 4 $30$ \gls*{overfitting} \hyperref[sec:the_cross-entropy_cost_function]{} \hyperref[how_to_choose_a_neural_network's_hyper-parameters]{\gls*{weight} }% \hyperref[sec:other_techniques_for_regularization]{} \\ \textbf{} --\gls*{pooling} $4$ \gls*{hidden-layer} $4$ \gls*{hidden-layer} \gls*{hidden-layer} $2$ \gls*{hidden-layer}2015 \gls*{hidden-layer} $1$$2$ 00 ~~ \\ \textbf{} \gls*{hidden-layer} ~~ \hyperref[sec:how_to_choose_a_neural_network's_hyper-parameters]{ } \section{} \label{sec:the_code_for_our_convolutional_networks} \lstinline!network3.py! \lstinline!network2.py! Theano \lstinline!FullyConnectedLayer! \begin{lstlisting}[language=Python] class FullyConnectedLayer(object): def __init__(self, n_in, n_out, activation_fn=sigmoid, p_dropout=0.0): self.n_in = n_in self.n_out = n_out self.activation_fn = activation_fn self.p_dropout = p_dropout # Initialize weights and biases self.w = theano.shared( np.asarray( np.random.normal( loc=0.0, scale=np.sqrt(1.0/n_out), size=(n_in, n_out)), dtype=theano.config.floatX), name='w', borrow=True) self.b = theano.shared( np.asarray(np.random.normal(loc=0.0, scale=1.0, size=(n_out,)), dtype=theano.config.floatX), name='b', borrow=True) self.params = [self.w, self.b] def set_inpt(self, inpt, inpt_dropout, mini_batch_size): self.inpt = inpt.reshape((mini_batch_size, self.n_in)) self.output = self.activation_fn( (1-self.p_dropout)*T.dot(self.inpt, self.w) + self.b) self.y_out = T.argmax(self.output, axis=1) self.inpt_dropout = dropout_layer( inpt_dropout.reshape((mini_batch_size, self.n_in)), self.p_dropout) self.output_dropout = self.activation_fn( T.dot(self.inpt_dropout, self.w) + self.b) def accuracy(self, y): "Return the accuracy for the mini-batch." return T.mean(T.eq(y, self.y_out)) \end{lstlisting} \lstinline!__init__! \gls*{weight} \gls*{weight} Theano GPU \href{path_to_url}{Theano } sigmoid \hyperref[sec:weight_initialization]{}\gls*{weight} \gls*{tanh} Rectified Linear Function \lstinline!__init__! \lstinline!self.params = [self.W, self.b]! \lstinline!Network.SGD! \lstinline!params! \lstinline!set_inpt! \lstinline!inpt! \lstinline!input! python \lstinline!input! \lstinline!self.input! \lstinline!self.inpt_dropout! dropout dropout \lstinline!self.p_dropout! \lstinline!set_inpt! \lstinline!dropout_layer! \lstinline!self.inpt_dropout! \lstinline!self.output_dropout! \lstinline!self.inpt! \lstinline!self.output! \lstinline!ConvPoolLayer! \lstinline!SoftmaxLayer! \lstinline!FullyConnectedLayer! \lstinline!network3.py! \lstinline!ConvPoolLayer! \lstinline!SoftmaxLayer! Theano max-pooling softmax \hyperref[sec:softmax]{softmax layer} \gls*{weight} sigmoid \gls*{weight} sigmoid \gls*{tanh} softmax $0$ ad hoc Network \lstinline!__init__! \begin{lstlisting}[language=Python] class Network(object): def __init__(self, layers, mini_batch_size): """Takes a list of `layers`, describing the network architecture, and a value for the `mini_batch_size` to be used during training by stochastic gradient descent. """ self.layers = layers self.mini_batch_size = mini_batch_size self.params = [param for layer in self.layers for param in layer.params] self.x = T.matrix("x") self.y = T.ivector("y") init_layer = self.layers[0] init_layer.set_inpt(self.x, self.x, self.mini_batch_size) for j in xrange(1, len(self.layers)): prev_layer, layer = self.layers[j-1], self.layers[j] layer.set_inpt( prev_layer.output, prev_layer.output_dropout, self.mini_batch_size) self.output = self.layers[-1].output self.output_dropout = self.layers[-1].output_dropout \end{lstlisting} \lstinline!self.params = [param for layer in ...]! \lstinline!Network.SGD! \lstinline!self.params! \lstinline!Network! \lstinline!self.x = T.matrix("x")! \lstinline!self.y = T.ivector("y")! Theano x y Theano Theano \gls*{pooling} \begin{lstlisting}[language=Python] init_layer.set_inpt(self.x, self.x, self.mini_batch_size) \end{lstlisting} mini-batch \gls*{mini-batch} \lstinline!self.x! dropoutdropout\lstinline!for! \lstinline!self.x! \lstinline!Network! \lstinline!output! \lstinline!output_dropout! \lstinline!Network! \lstinline!Network! \lstinline!SGD! \begin{lstlisting}[language=Python] def SGD(self, training_data, epochs, mini_batch_size, eta, validation_data, test_data, lmbda=0.0): """Train the network using mini-batch stochastic gradient descent.""" training_x, training_y = training_data validation_x, validation_y = validation_data test_x, test_y = test_data # compute number of minibatches for training, validation and testing num_training_batches = size(training_data)/mini_batch_size num_validation_batches = size(validation_data)/mini_batch_size num_test_batches = size(test_data)/mini_batch_size # define the (regularized) cost function, symbolic gradients, and updates l2_norm_squared = sum([(layer.w**2).sum() for layer in self.layers]) cost = self.layers[-1].cost(self)+\ 0.5*lmbda*l2_norm_squared/num_training_batches grads = T.grad(cost, self.params) updates = [(param, param-eta*grad) for param, grad in zip(self.params, grads)] # define functions to train a mini-batch, and to compute the # accuracy in validation and test mini-batches. i = T.lscalar() # mini-batch index train_mb = theano.function( [i], cost, updates=updates, givens={ self.x: training_x[i*self.mini_batch_size: (i+1)*self.mini_batch_size], self.y: training_y[i*self.mini_batch_size: (i+1)*self.mini_batch_size] }) validate_mb_accuracy = theano.function( [i], self.layers[-1].accuracy(self.y), givens={ self.x: validation_x[i*self.mini_batch_size: (i+1)*self.mini_batch_size], self.y: validation_y[i*self.mini_batch_size: (i+1)*self.mini_batch_size] }) test_mb_accuracy = theano.function( [i], self.layers[-1].accuracy(self.y), givens={ self.x: test_x[i*self.mini_batch_size: (i+1)*self.mini_batch_size], self.y: test_y[i*self.mini_batch_size: (i+1)*self.mini_batch_size] }) self.test_mb_predictions = theano.function( [i], self.layers[-1].y_out, givens={ self.x: test_x[i*self.mini_batch_size: (i+1)*self.mini_batch_size] }) # Do the actual training best_validation_accuracy = 0.0 for epoch in xrange(epochs): for minibatch_index in xrange(num_training_batches): iteration = num_training_batches*epoch+minibatch_index if iteration print("Training mini-batch number {0}".format(iteration)) cost_ij = train_mb(minibatch_index) if (iteration+1) validation_accuracy = np.mean( [validate_mb_accuracy(j) for j in xrange(num_validation_batches)]) print("Epoch {0}: validation accuracy {1:.2 epoch, validation_accuracy)) if validation_accuracy >= best_validation_accuracy: print("This is the best validation accuracy to date.") best_validation_accuracy = validation_accuracy best_iteration = iteration if test_data: test_accuracy = np.mean( [test_mb_accuracy(j) for j in xrange(num_test_batches)]) print('The corresponding test accuracy is {0:.2 test_accuracy)) print("Finished training network.") print("Best validation accuracy of {0:.2 best_validation_accuracy, best_iteration)) print("Corresponding test accuracy of {0:.2 \end{lstlisting} x y \gls*{mini-batch} Theano \begin{lstlisting}[language=Python] # define the (regularized) cost function, symbolic gradients, and updates l2_norm_squared = sum([(layer.w**2).sum() for layer in self.layers]) cost = self.layers[-1].cost(self)+\ 0.5*lmbda*l2_norm_squared/num_training_batches grads = T.grad(cost, self.params) updates = [(param, param-eta*grad) for param, grad in zip(self.params, grads)] \end{lstlisting} \gls*{regularization} Theano \lstinline!cost! \lstinline!cost! \lstinline!network3.py! \lstinline!train_mini_batch! Theano minibatch \lstinline!updates! \lstinline!Network! \lstinline!validate_mb_accuracy! \lstinline!test_mb_accuracy! minibatch \lstinline!Network! \lstinline!SGD! ~~ \gls*{mini-batch} \lstinline!network3.py! \footnote{ GPU Theano GPU mn@michaelnielsen.org} \lstinputlisting[language=Python]{code_samples/src/network3.py} \subsection*{} \begin{itemize} \item \lstinline!SGD! \gls*{epoch} \hyperref[early_stopping]{} \lstinline!network3.py! \item \lstinline!Network! \item \lstinline!SGD! $\eta$ \textbf{ \href{path_to_url#!topic/theano-users/NQ9NYLvleGc}{ }} \item \lstinline!network3.py! \textbf{ } \item \lstinline!network3.py! \lstinline!load! \lstinline!save! \item \item \gls*{relu} S \gls*{tanh-func} \hyperref[sec:weight_initialization]{} \gls*{sigmoid-func} ReLU $c$ \gls*{weight} $c$ softmax ReLU \gls*{sigmoid-func} \textbf{ ReLU } \item % \hyperref[sec:your_sha256_hashs_in_deep_neural_nets]{% } sigmoid ReLU \textbf{ } \end{itemize} \section{} \label{sec:recent_progress_in_image_recognition} 1998 MNIST GPU MNIST ~~ \gls*{regularization} 2100 2011 2015 \gls*{cnn} 2100 \\ \textbf{2012 LRMD } 2012 \footnote{\href{path_to_url}{Building high-level features using large scale unsupervised learning} Quoc LeMarc'Aurelio Ranzato Rajat Monga Matthieu Devin Kai Chen Greg CorradoJeff Dean Andrew Ng 2012 LRMD } LRMDLRMD \href{path_to_url}{ImageNet} 2011 ImageNet 16,000,000 20,000 Mechanical Turk ImageNet \footnote{ 2014 2011 ImageNet ImageNet \href{path_to_url}{ ImageNet: a large-scale hierarchical image database} Jia DengWei DongRichard Socher Li-Jia Li Kai Li Li Fei-Fei 2009} \begin{center} \includegraphics[height=80pt]{imagenet1.jpg}% \includegraphics[height=80pt]{imagenet2.jpg}% \includegraphics[height=80pt]{imagenet3.jpg}% \includegraphics[height=80pt]{imagenet4.jpg} \end{center} ImageNet \href{path_to_url}{} MNIST LRMD 15.8\% ImageNet 9.3\% ImageNet\\ \textbf{2012 KSH } LRMD Krizhevsky, Sutskever Hinton KSH \footnote{\href{path_to_url~fritz/absps/imagenet.pdf}{ImageNet classification with deep convolutional neural networks} Alex KrizhevskyIlya Sutskever Geoffrey E. Hinton 2012} 2012 KSH \gls*{cnn} ImageNet ~~ImageNet Large-Scale Visual Recognition ChallengeILSVRC ILSVRC-2012 1,200,000 ImageNet 1,000 50,000 150,000 1,000 ILSVRC ImageNet ImageNet ImageNet $5$ $5$ KSH $84.7$\% $73.8$\% KSH $63.3$\% KSH KSH \gls*{cnn} GPU GPU GPU NVIDIA GeForce GTX 580 GPU KSH $7$ $5$ \gls*{hidden-layer}\gls*{pooling} $2$ $1,000$ $1,000$ KSH \footnote{ Ilya Sutskever} $2$ $2$ GPU \begin{center} \includegraphics[width=.9\textwidth]{KSH} \end{center} $3 \times 224 \times 224$ $224 \times 224$ RBG ImageNet KSH $256$ $256 \times 256$ KSH $256 \times 256$ $224 \times 224$ \gls*{overfitting} KSH $224 \times 224$ KSH Alex Krizhevsky \href{path_to_url}{cuda-convnet} Theano \footnote{\href{path_to_url}{Theano-based large-scale visual recognition with multiple GPUs} Weiguang Ding Ruoyan WangFei Mao Graham Taylor 2014}% \href{path_to_url}{} GPUCaffe KSH \href{path_to_url}{Model Zoo}\\ \textbf{2014 ILSVRC } 2012 2014 ILSVRC 2012 $120,000$ $1,000$ $5$ \footnote{\href{path_to_url}{Going deeper with convolutions} Christian Szegedy Wei Liu Yangqing Jia Pierre SermanetScott Reed Dragomir Anguelov Dumitru Erhan Vincent Vanhoucke Andrew Rabinovich 2014} $22$ GoogLeNet LeNet-5 GoogLeNet 93.33\% $5$ 2013 \href{path_to_url}{Clarifai}88.3\%2012 KSH84.7\% GoogLeNet 93.33\% 2014 ILSVRC \footnote{\href{path_to_url}{ImageNet large scale visual recognition challenge} Olga Russakovsky Jia DengHao Su Jonathan Krause Sanjeev Satheesh Sean Ma Zhiheng HuangAndrej Karpathy Aditya Khosla Michael Bernstein Alexander C. Berg Li Fei-Fei2014} ILSVRC Andrej Karpathy % \href{path_to_url}{% } GoogLeNet \begin{quote} ... 1000 5 ILSVRC Amazon Mechanical Turk GoogLeNet 1000 100~~ 13--15\% GoogLeNet ... 1 ... ... GoogLeNet 6.8\%... 5.1\% 1.7\% \end{quote} Karpathy 12.0\% top-5 GoogLeNet top-5 \textbf{} 5.1\% ILSVRC ~~ top-5 \\ \textbf{} ImageNet Google Google \footnote{\href{path_to_url}{Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks} Ian J. Goodfellow Yaroslav Bulatov Julian Ibarz Sacha Arnoud Vinay Shet2013} $100,000,000$ Google Maps OCR 2013 \footnote{\href{path_to_url}{Intriguing properties of neural networks} Christian SzegedyWojciech Zaremba Ilya Sutskever Joan Bruna Dumitru Erhan Ian Goodfellow Rob Fergus 2013} ImageNet \begin{center} \includegraphics[width=.75\textwidth]{adversarial.jpg} \end{center} KSH \begin{quote} \end{quote} \footnote{\href{path_to_url}{Deep Neural Networks are Easily Fooled: High Confidence Predictions for Unrecognizable Images} Anh Nguyen Jason Yosinski Jeff Clune2014} \section{} \label{sec:other_approaches_to_deep_neural_nets} MNIST RNNBoltzmann Machine \\ \textbf{\gls*{rnn}RNNs} \textbf{\gls{rnn}} \textbf{RNN(s)} RNN \href{path_to_url}{ RNN } RNN 13 RNN RNN RNN Turing % \href{path_to_url}{ 2014 } RNN python python \href{path_to_url}{} 2014 RNN Turing NTM \lstinline!print(398345+42598)! Python Web RNN RNN RNN RNN RNN to infinity and beyondtwo infinity and beyondRNN RNN Google Android \href{path_to_url}{Vincent Vanhoucke 2012-2015 } RNN RNN \gls*{bp} RNN RNN RNN \\ \textbf{\gls{lstm}LSTMs} RNNs \hyperref[ch:WhyHardToTrain]{} RNN long short-term memory RNN LSTM \href{path_to_url}{Hochreiter Schmidhuber 1997 }LSTM RNN LSTM \\ \textbf{} 2006 \textbf{\gls{dbn}}DBN\footnote{ Geoffrey Hinton, Simon Osindero Yee-Whye Teh 2006 \href{path_to_url~hinton/absps/fastnc.pdf}{A fast learning algorithm for deep belief nets}, Geoffrey Hinton Ruslan Salakhutdinov 2006 \href{path_to_url}{Reducing the dimensionality of data with neural networks}}DBN RNN DBN DBN DBN \textbf{} DBN DBN DBN Geoffrey Hinton to recognize shapesfirst learn to generate images DBN DBN DBN RNN DBN DBN DBN \href{path_to_url}{DBN } \href{path_to_url~hinton/absps/guideTR.pdf}{} DBN DBN Boltzmann \\ \textbf{} % \href{path_to_url}{ }(see \href{path_to_url}{also this informative review paper})% \href{path_to_url}{ }% \href{path_to_url}{} % \href{path_to_url~vmnih/docs/dqn.pdf}{} \href{path_to_url}{ } 7 3 Playing Atari with reinforcement learning \section{} \label{sec:on_the_future_of_neural_networks} \textbf{} \textbf{} Google []?Google CEO Larry Page \textbf{\gls{idui}} SiriWolfram AlphaIBM Watson 2005 \textbf{} \\ \textbf{} 1 1 10 \\ \textbf{} 1980 \gls*{bp} 1990 SVM \gls*{overfitting} ImageNet 10 \\ \textbf{} AI AI \href{path_to_url}{Conway's law} \begin{quote} \end{quote} Conway 747 747 dashboard dashboard Conway Conway 747 747 Conway Conway Conway ~~ Conway Conway AI Conway AI AI 747 Werner von Braun Conway Galen Hippocrates deep\footnote{ deep } ~~~~ \textbf{ } Conway AI AI \footnote{ Yann LeCun \href{path_to_url}{ }}Prolog Prolog \href{path_to_url}{Eurisko} Conway SGD AI [] AIConway AI AI 10 AI 60 10 ```
/content/code_sandbox/chap6.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
11,211
```tex % file: chap2.tex \chapter{} \label{ch:HowTheBackpropagationAlgorithmWorks} \hyperref[ch:UsingNeuralNetsToRecognizeHandwrittenDigits]{} \gls*{weight}\gls*{bias} \textbf{\gls{bp}} \gls*{bp} 1970 \href{path_to_url}{David Rumelhart} \href{path_to_url~hinton/}{Geoffrey Hinton} \href{path_to_url}{Ronald Williams} \href{path_to_url}{1986 } \gls*{bp} $C$ \gls*{weight} $w$ \gls*{bias} $b$ $\partial C/\partial w$ \gls*{weight}\gls*{bias} % \gls*{bp}% \gls*{weight}\gls*{bias}\gls*{bp} \gls*{bp} \section{} \label{sec:warm_up} \gls*{bp}% \hyperref[sec:implementing_our_network_to_classify_digits]{} \gls*{bp} \gls*{weight} $w^l_{jk}$ $(l-1)^{\rm th}$ $k^{\rm th}$ $l^{\rm th}$ $j^{\rm th}$ \gls*{weight} \gls*{weight} \begin{center} \includegraphics{tikz16} \end{center} $j$ $k$ \gls*{bias} $b^l_j$ $l^{\rm th}$ $j^{\rm th}$ \gls*{bias} $a^l_j$ $l^{\rm th}$ $j^{\rm th}$ \begin{center} \includegraphics{tikz17} \end{center} $l^{\rm th}$ $j^{\rm th}$ $a^{l}_j$ $(l-1)^{\rm th}$ ~\eqref{eq:4} \begin{equation} a^{l}_j = \sigma\left( \sum_k w^{l}_{jk} a^{l-1}_k + b^l_j \right) \label{eq:23}\tag{23} \end{equation} $(l-1)^{\rm th}$ $k$ $l$ \textbf{\gls*{weight}} $w^l$% \gls*{weight} $w^l$ $l^{\rm th}$ \gls*{weight} $j^{\rm th}$ $k^{\rm th}$ $w^l_{jk}$ $l$\textbf{\gls*{bias}}$b^l$ ~~\gls*{bias} $b^l_j$ $l^{\rm th}$ $a^l$ $a^l_j$ $\sigma$~\eqref{eq:23} $\sigma$ $v$ $\sigma(v)$ $\sigma(v)$ $\sigma(v)_j = \sigma(v_j)$ $f(x) = x^2$ $f$ \begin{equation} f\left(\left[ \begin{array}{c} 2 \\ 3 \end{array} \right] \right) = \left[ \begin{array}{c} f(2) \\ f(3) \end{array} \right] = \left[ \begin{array}{c} 4 \\ 9 \end{array} \right] \label{eq:24}\tag{24} \end{equation} $f$ ~\eqref{eq:23} \begin{equation} a^{l} = \sigma(w^l a^{l-1}+b^l) \label{eq:25}\tag{25} \end{equation} \gls*{weight}\gls*{bias} $\sigma$ \footnote{ $w_{jk}^l$ $j$ $k$ ~\eqref{eq:25} \gls*{weight}} % \hyperref[sec:implementing_our_network_to_classify_digits]{} ~\eqref{eq:25} $a^l$ $z^l \equiv w^l a^{l-1}+b^l$ $z^l$ $l$ \textbf{ } $z^l$ ~\eqref{eq:25} $a^l = \sigma(z^l)$ $z^l$ $z^l_j = \sum_k w^l_{jk} a^{l-1}_k+b^l_j$ $z^l_j$ $l$ $j$ \section{} \label{sec:TwoAssumptionsWeNeedAboutTheCostFunction} \gls*{bp} $C$ $w$ $b$ $\partial C/\partial w$ $\partial C / \partial b$\gls*{bp} ~\eqref{eq:6} \begin{equation} C = \frac{1}{2n} \sum_x \|y(x)-a^L(x)\|^2 \label{eq:26}\tag{26} \end{equation} $n$ $x$$y = y(x)$ $L$ $a^L = a^L(x)$ $x$ \gls*{bp} $C$ $x$ $C_x$ $C=\frac{1}{n} \sum_x C_x$ $C_x = \frac{1}{2} ||y-a^L||^2$ \gls*{bp} $\partial C_x/\partial w$ $\partial C_x/\partial b$ $\partial C/\partial w$ $\partial C/\partial b$ $x$ $C_x$ $C$ \begin{center} \includegraphics{tikz18} \end{center} $x$ \begin{equation} C = \frac{1}{2} \|y-a^L\|^2 = \frac{1}{2} \sum_j (y_j-a^L_j)^2 \label{eq:27}\tag{27} \end{equation} $y$ $y$ $x$ $y$ \gls*{weight}% \gls*{bias} $C$ $a^L$ $y$ \section{Hadamard $s \odot t$} \label{sec:the_hadamard_product} \gls*{bp}~~ $s$ $t$ $s\odot t$ \textbf{} $s\odot t$ $(s\odot t)_j = s_j t_j$ \begin{equation} \left[\begin{array}{c} 1 \\ 2 \end{array}\right] \odot \left[\begin{array}{c} 3 \\ 4\end{array} \right] = \left[ \begin{array}{c} 1 * 3 \\ 2 * 4 \end{array} \right] = \left[ \begin{array}{c} 3 \\ 8 \end{array} \right] \label{eq:28}\tag{28} \end{equation} \textbf{Hadamard }\textbf{Schur } Hadamard \gls*{bp} \section{} \label{sec:the_four_fundamental_equations_behind_backpropagation} \gls*{bp}\gls*{weight}\gls*{bias} $\partial C/\partial w_{jk}^l$ $\partial C/\partial b_j^l$$\delta_j^l$ $l^{th}$ $j^{th}$ \textbf{\gls{error}} \gls*{bp} $\delta_j^l$ $\partial C/\partial w_{jk}^l$ $\partial C/\partial b_j^l$ \begin{center} \includegraphics{tikz19} \end{center} $l$ $j^{th}$ $\Delta z_j^l$ $\sigma(z_j^l)$ $\sigma(z_j^l + \Delta z_j^l)$ $\frac{\partial C}{\partial z_j^l} \Delta z_j^l$ $\Delta z_j^l$ $\frac{\partial C}{\partial z_j^l}$ $\frac{\partial C}{\partial z_j^l}$ $\Delta z_j^l$ $\frac{\partial C}{\partial z_j^l}$$0$ $z_j^l$ \footnote{ $\Delta z_j^l$ } $\frac{\partial C}{\partial z_j^l}$ $l$ $j^{th}$ $\delta_j^l$ \begin{equation} \delta^l_j \equiv \frac{\partial C}{\partial z^l_j} \label{eq:29}\tag{29} \end{equation} $\delta^l$ $l$ \gls*{bp} $\delta^l$ $\partial C/\partial w_{jk}^l$ $\partial C/\partial b_j^l$ $z_j^l$ $a_j^l$ $\frac{\partial C}{\partial a_j^l}$ \gls*{bp} $\delta_j^l = \partial C / \partial z_j^l$ \footnote{ 96.0\% 4.0\% }\\ \textbf{} \gls*{bp} $\delta^l$ \gls*{bp} % \hyperref[sec:proof_of_the_four_fundamental_equations]{} % \hyperref[sec:the_backpropagation_algorithm]{}% \hyperref[sec:the_code_for_backpropagation]{} Python \hyperref[sec:backpropagation_the_big_picture]{} \gls*{bp} \\ \textbf{$\delta^L$} \begin{equation} \delta^L_j = \frac{\partial C}{\partial a^L_j} \sigma'(z^L_j) \label{eq:bp1}\tag{BP1} \end{equation} $\partial C/\partial a_j^L$ $j^{th}$ $C$ $j$ $\delta_j^L$ $\sigma'(z_j^L)$ $z_j^L$ $\sigma$ \eqref{eq:bp1} $z_j^L$ $\sigma'(z_j^L)$ $\partial C/\partial a_j^L$ $\partial C/\partial a_j^L$ $C = \frac{1}{2} \sum_j(y_j-a_j)^2$ $\partial C/\partial a_j^L = (a_j - y_j)$ ~\eqref{eq:bp1} $\delta^L$ \begin{equation} \delta^L = \nabla_a C \odot \sigma'(z^L) \label{eq:bp1a}\tag{BP1a} \end{equation} $\nabla_a C$ $\partial C/\partial a_j^L$ $\nabla_a C$ $C$ ~\eqref{eq:bp1} ~\eqref{eq:bp1a} \eqref{eq:bp1} $\nabla_a C = (a^L - y)$ \eqref{eq:bp1} \begin{equation} \delta^L = (a^L-y) \odot \sigma'(z^L) \label{eq:30}\tag{30} \end{equation} Numpy \\ \textbf{ $\delta^{l+1}$ $\delta^l$} \begin{equation} \delta^l = ((w^{l+1})^T \delta^{l+1}) \odot \sigma'(z^l) \label{eq:bp2}\tag{BP2} \end{equation} $(w^{l+1})^T$ $(l+1)^{\rm th}$ \gls*{weight} $w^{l+1}$ $l+1^{\rm th}$ $\delta^{l+1}$\gls*{weight} $(w^{l+1})^T$ \textbf{} $l^{\rm th}$ Hadamard $\odot \sigma'(z^l)$ $l$ $l$ $\delta$ ~\eqref{eq:bp1} ~\eqref{eq:bp2} $\delta^l$ ~\eqref{eq:bp1} $\delta^L$~\eqref{eq:bp2} $\delta^{L-1}$~\eqref{eq:bp2} $\delta^{L-2}$ \gls*{bp}\\ \textbf{\gls*{bias}} \begin{equation} \frac{\partial C}{\partial b^l_j} = \delta^l_j \label{eq:bp3}\tag{BP3} \end{equation} $\delta^l_j$ $\partial C / \partial b^l_j$ \textbf{ } \eqref{eq:bp1} \eqref{eq:bp2} $\delta^l_j$ \eqref{eq:bp3} \begin{equation} \frac{\partial C}{\partial b} = \delta \label{eq:31}\tag{31} \end{equation} $\delta$ \gls*{bias} $b$ \\ \textbf{\gls*{weight}} \begin{equation} \frac{\partial C}{\partial w^l_{jk}} = a^{l-1}_k \delta^l_j \label{eq:bp4}\tag{BP4} \end{equation} $\partial C/\partial w_{jk}^l$ $\delta^l$ $a^{l-1}$ \begin{equation} \frac{\partial C}{\partial w} = a_{\rm in} \delta_{\rm out} \label{eq:32}\tag{32} \end{equation} $a_{\rm in}$ \gls*{weight} $w$ $\delta_{\rm out}$ \gls*{weight} $w$ \gls*{weight} $w$ \gls*{weight} \begin{center} \includegraphics{tikz20} \end{center} ~\eqref{eq:32} $a_{\rm in}$ $a_{\rm in} \approx 0$ $\partial C/\partial w$ % \gls*{weight}\textbf{}\gls*{weight} \eqref{eq:bp4} \gls*{weight} \eqref{eq:bp1}--\eqref{eq:bp4} ~\eqref{eq:bp1} $\sigma'(z_k^l)$% \hyperref[fig:StepFunction]{S} $\sigma(z^L_j)$ $0$ $1$ $\sigma$ $\sigma'(z^L_j) \approx 0$ $\approx 0$$\approx 1$ \gls*{weight}\textbf{}\gls*{weight} \gls*{bias} ~\eqref{eq:bp2} $\sigma'(z^l)$$\delta_j^l$ \gls*{weight}\footnote{ ${w^{l+1}}^T \delta^{l+1}$ $\sigma'(z_k^l)$ } \gls*{weight} \textbf{} S $\sigma$ $\sigma'$ $0$S \eqref{eq:bp1}--\eqref{eq:bp4} \begin{center} \begin{minipage}{0.7\textwidth} \begin{framed} \centering \textbf{\gls*{bp}}\label{backpropsummary}\\ \vspace{1.5ex} \begin{tabular}{ll} $\delta^L = \nabla_a C \odot \sigma'(z^L)$ & \hspace{2cm}\eqref{eq:bp1} \\[1.5ex] $\delta^l = ((w^{l+1})^T \delta^{l+1}) \odot \sigma'(z^l)$ & \hspace{2cm}\eqref{eq:bp2} \\[1.5ex] $\frac{\partial C}{\partial b^l_j} = \delta^l_j$ & \hspace{2cm}\eqref{eq:bp3} \\[1.5ex] $\frac{\partial C}{\partial w^l_{jk}} = a^{l-1}_k \delta^l_j$ & \hspace{2cm}\eqref{eq:bp4} \end{tabular} \end{framed} \end{minipage} \end{center} \subsection*{} \begin{itemize} \item \textbf{\gls*{bp}} Hadamard \gls*{bp}~\eqref{eq:bp1} ~\eqref{eq:bp2} 1~\eqref{eq:bp1} \begin{equation} \delta^L = \Sigma'(z^L) \nabla_a C \label{eq:33}\tag{33} \end{equation} $\Sigma'(z^L)$ $\sigma'(z_j^L)$ $0$ $\nabla_a C$ 2 ~\eqref{eq:bp2} \begin{equation} \delta^l = \Sigma'(z^l) (w^{l+1})^T \delta^{l+1} \label{eq:34}\tag{34} \end{equation} 312 \begin{equation} \delta^l = \Sigma'(z^l) (w^{l+1})^T \ldots \Sigma'(z^{L-1}) (w^L)^T \Sigma'(z^L) \nabla_a C \label{eq:35}\tag{35} \end{equation} \eqref{eq:bp1} \eqref{eq:bp2} Hadamard \end{itemize} \section{} \label{sec:proof_of_the_four_fundamental_equations} \eqref{eq:bp1}--\eqref{eq:bp4} \href{path_to_url}{}% ~\eqref{eq:bp1} $\delta^L$ \begin{equation} \delta^L_j = \frac{\partial C}{\partial z^L_j} \label{eq:36}\tag{36} \end{equation} \begin{equation} \delta^L_j = \sum_k \frac{\partial C}{\partial a^L_k} \frac{\partial a^L_k}{\partial z^L_j} \label{eq:37}\tag{37} \end{equation} $k$ $k^{\rm th}$ $a^L_k$ $k=j$ $j^{\rm th}$ \gls*{weight} $z^L_j$ $k \neq j$ $\partial a^L_k / \partial z^L_j$ \begin{equation} \delta^L_j = \frac{\partial C}{\partial a^L_j} \frac{\partial a^L_j}{\partial z^L_j} \label{eq:38}\tag{38} \end{equation} $a^L_j = \sigma(z^L_j)$ $\sigma'(z^L_j)$ \begin{equation} \delta^L_j = \frac{\partial C}{\partial a^L_j} \sigma'(z^L_j) \label{eq:39}\tag{39} \end{equation} ~\eqref{eq:bp1} ~\eqref{eq:bp2} $\delta^{l+1}$ $\delta^l$ $\delta^{l+1}_k = \partial C / \partial z^{l+1}_k$ $\delta^l_j = \partial C / \partial z^l_j$ \begin{align} \delta^l_j &= \frac{\partial C}{\partial z^l_j} \label{eq:40}\tag{40}\\ &= \sum_k \frac{\partial C}{\partial z^{l+1}_k} \frac{\partial z^{l+1}_k}{\partial z^l_j} \label{eq:41}\tag{41}\\ &= \sum_k \frac{\partial z^{l+1}_k}{\partial z^l_j} \delta^{l+1}_k \label{eq:42}\tag{42} \end{align} $\delta^{l+1}_k$ \begin{equation} z^{l+1}_k = \sum_j w^{l+1}_{kj} a^l_j +b^{l+1}_k = \sum_j w^{l+1}_{kj} \sigma(z^l_j) +b^{l+1}_k \label{eq:43}\tag{43} \end{equation} \begin{equation} \frac{\partial z^{l+1}_k}{\partial z^l_j} = w^{l+1}_{kj} \sigma'(z^l_j) \label{eq:44}\tag{44} \end{equation} ~\eqref{eq:42} \begin{equation} \delta^l_j = \sum_k w^{l+1}_{kj} \delta^{l+1}_k \sigma'(z^l_j) \label{eq:45}\tag{45} \end{equation} ~\eqref{eq:bp2} ~\eqref{eq:bp3} ~\eqref{eq:bp4} \subsection*{} \begin{itemize} \item ~\eqref{eq:bp3} ~\eqref{eq:bp4} \end{itemize} \gls*{bp} \gls*{bp} \gls*{bp}~~ \section{} \label{sec:the_backpropagation_algorithm} \gls*{bp} \begin{enumerate} \item \textbf{ $x$} $a^{1}$ \item \textbf{} $l=2,3,...,L$ $z^l = w^la^{l-1} + b^l$ $a^l = \sigma(z^l)$ \item \textbf{ $\delta^L$} $\delta^L = \nabla_a C \odot \sigma'(z^L)$ \item \textbf{} $l=L-1, L-2,...,2$ $\delta^l = ((w^{l+1})^T\delta^{l+1})\odot \sigma'(z^l)$ \item \textbf{} $\frac{\partial C}{\partial w^l_{jk}} = a^{l-1}_k \delta^l_j$ $\frac{\partial C}{\partial b_j^l} = \delta_j^l$ \end{enumerate} \textbf{} $\delta^l$ \gls*{weight}\gls*{bias} \subsection*{} \begin{itemize} \item \textbf{\gls*{bp}}\quad $f(\sum_j w_jx_j + b)$ $f$ S \gls*{bp} \item \textbf{\gls*{bp}}\quad $\sigma$ $\sigma(z) = z$\gls*{bp} \end{itemize} \gls*{bp}$C=C_x$ \gls*{bp} $m$ \gls*{mini-batch} \gls*{mini-batch} \begin{enumerate} \item \textbf{} \item \textbf{ $x$} $a^{x,1}$ \begin{itemize} \item \textbf{} $l=2,3,...,L$ $z^{x,l} = w^la^{x,l-1} + b^l$ $a^{x,l} = \sigma(z^{x,l})$ \item \textbf{ $\delta^{x,L}$} $\delta^{x,L} = \nabla_a C_x \odot \sigma'(z^{x,L})$ \item \textbf{\gls*{bp}} $l=L-1, L-2, ..., 2$ $\delta^{x,l} = ((w^{l+1})^T\delta^{x,l+1})\odot \sigma'(z^{x,l})$ \end{itemize} \item \textbf{} $l=L-1, L-2, ..., 2$ $w^l \rightarrow w^l - \frac{\eta}{m}\sum_x \delta^{x,l}(a^{x,l-1})^T$ $b^l \rightarrow b^l - \frac{\eta}{m}\sum_x \delta^{x,l}$ \gls*{weight}\gls*{bias} \end{enumerate} \gls*{mini-batch} \gls*{epoch} \section{} \label{sec:the_code_for_backpropagation} \gls*{bp}\gls*{bp} \hyperref[sec:implementing_our_network_to_classify_digits]{} \lstinline!Network! \lstinline!update_mini_batch! \lstinline!backprop! \lstinline!update_mini_batch! \lstinline!mini_batch! \lstinline!Network! \gls*{weight}\gls*{bias} \begin{lstlisting}[language=Python] class Network(object): ... def update_mini_batch(self, mini_batch, eta): """Update the network's weights and biases by applying gradient descent using backpropagation to a single mini batch. The "mini_batch" is a list of tuples "(x, y)", and "eta" is the learning rate.""" nabla_b = [np.zeros(b.shape) for b in self.biases] nabla_w = [np.zeros(w.shape) for w in self.weights] for x, y in mini_batch: delta_nabla_b, delta_nabla_w = self.backprop(x, y) nabla_b = [nb+dnb for nb, dnb in zip(nabla_b, delta_nabla_b)] nabla_w = [nw+dnw for nw, dnw in zip(nabla_w, delta_nabla_w)] self.weights = [w-(eta/len(mini_batch))*nw for w, nw in zip(self.weights, nabla_w)] self.biases = [b-(eta/len(mini_batch))*nb for b, nb in zip(self.biases, nabla_b)] \end{lstlisting} \lstinline!delta_nabla_b!% \lstinline!delta_nabla_w = self.backprop(x, y)! \lstinline!backprop! $\partial C_x/\partial b_j^l$ $\partial C_x/\partial w_{jk}^l$ \lstinline!backprop! ~~ Python ~~ \lstinline!l[-3]! \lstinline!backprop! $\sigma$ $\sigma'$ % \hyperref[sec:implementing_our_network_to_classify_digits]{ } \begin{lstlisting}[language=Python] class Network(object): ... def backprop(self, x, y): """Return a tuple "(nabla_b, nabla_w)" representing the gradient for the cost function C_x. "nabla_b" and "nabla_w" are layer-by-layer lists of numpy arrays, similar to "self.biases" and "self.weights".""" nabla_b = [np.zeros(b.shape) for b in self.biases] nabla_w = [np.zeros(w.shape) for w in self.weights] # feedforward activation = x activations = [x] # list to store all the activations, layer by layer zs = [] # list to store all the z vectors, layer by layer for b, w in zip(self.biases, self.weights): z = np.dot(w, activation)+b zs.append(z) activation = sigmoid(z) activations.append(activation) # backward pass delta = self.cost_derivative(activations[-1], y) * \ sigmoid_prime(zs[-1]) nabla_b[-1] = delta nabla_w[-1] = np.dot(delta, activations[-2].transpose()) # Note that the variable l in the loop below is used a little # differently to the notation in Chapter 2 of the book. Here, # l = 1 means the last layer of neurons, l = 2 is the # second-last layer, and so on. It's a renumbering of the # scheme in the book, used here to take advantage of the fact # that Python can use negative indices in lists. for l in xrange(2, self.num_layers): z = zs[-l] sp = sigmoid_prime(z) delta = np.dot(self.weights[-l+1].transpose(), delta) * sp nabla_b[-l] = delta nabla_w[-l] = np.dot(delta, activations[-l-1].transpose()) return (nabla_b, nabla_w) ... def cost_derivative(self, output_activations, y): """Return the vector of partial derivatives \partial C_x / \partial a for the output activations.""" return (output_activations-y) def sigmoid(z): """The sigmoid function.""" return 1.0/(1.0+np.exp(-z)) def sigmoid_prime(z): """Derivative of the sigmoid function.""" return sigmoid(z)*(1-sigmoid(z)) \end{lstlisting} \subsection*{} \begin{itemize} \item \textbf{\gls*{mini-batch}\gls*{bp}}\quad \gls*{mini-batch}% \gls*{bp}\gls*{mini-batch} $X=[x_1, x_2, ..., x_m]$% \gls*{mini-batch}$x$\gls*{weight} \gls*{bias}S \gls*{bp} \lstinline!network.py! % \gls*{mini-batch}MNIST 2 % \gls*{bp} \end{itemize} \section{} \gls*{bp} 5060 % \gls*{weight} $C = C(w)$\gls*{bias}% \gls*{weight} $w_1, w_2, \ldots$ \gls*{weight} $w_j$ $\partial C / \partial w_j$ \begin{equation} \frac{\partial C}{\partial w_{j}} \approx \frac{C(w+\epsilon e_j)-C(w)}{\epsilon} \label{eq:46}\tag{46} \end{equation} $\epsilon > 0$ $e_j$ $j$ $w_j$ $C$ $\partial C/\partial w_j$~\eqref{eq:46} $\partial C/\partial b$ $1,000,000$ \gls*{weight}\gls*{weight} $w_j$ $C(w+\epsilon e_j)$ $\partial C/\partial w_j$ $1, 000, 000 $ $1, 000, 000$ $C(w)$ $1,000,001$ \gls*{bp}\textbf{} $\partial C/\partial w_j$ \footnote{ \gls*{weight}\gls*{bp} \gls*{weight}}% \gls*{bp}\gls*{bp} \gls*{bp}~\eqref{eq:46} 1986 \gls*{bp} 1980 \gls*{bp} \gls*{bp} \section{} \label{sec:backpropagation_the_big_picture} \gls*{bp} \gls*{bp} $w_{jk}^l$ $\Delta w_{jk}^l$ \begin{center} \includegraphics{tikz22} \end{center} \begin{center} \includegraphics{tikz23} \end{center} \textbf{} \begin{center} \includegraphics{tikz24} \end{center} \begin{center} \includegraphics{tikz25} \end{center} $\Delta C$ $\Delta w_{jk}^l$ \begin{equation} \Delta C \approx \frac{\partial C}{\partial w^l_{jk}} \Delta w^l_{jk} \label{eq:47}\tag{47} \end{equation} $\frac{\partial C}{\partial w_{jk}^l}$ $w_{jk}^l$ $C$ $\partial C / \partial w^l_{jk}$ $\Delta w_{jk}^l$ $l^{th}$ $j^{th}$ $\Delta a_j^l$ \begin{equation} \Delta a^l_j \approx \frac{\partial a^l_j}{\partial w^l_{jk}} \Delta w^l_{jk} \label{eq:48}\tag{48} \end{equation} $\Delta a_j^l$ $(l+1)^{\rm th}$ \textbf{} $a_q^{l+1}$ \begin{center} \includegraphics{tikz26} \end{center} \begin{equation} \Delta a^{l+1}_q \approx \frac{\partial a^{l+1}_q}{\partial a^l_j} \Delta a^l_j \label{eq:49}\tag{49} \end{equation} ~\eqref{eq:48} \begin{equation} \Delta a^{l+1}_q \approx \frac{\partial a^{l+1}_q}{\partial a^l_j} \frac{\partial a^l_j}{\partial w^l_{jk}} \Delta w^l_{jk} \label{eq:50}\tag{50} \end{equation} $\Delta a^{l+1}_q$ $w_{jk}^l$ $C$ $a_j^l, a_q^{l+1}, ...,a_n^{L-1},a_m^{L}$ \begin{equation} \Delta C \approx \frac{\partial C}{\partial a^L_m} \frac{\partial a^L_m}{\partial a^{L-1}_n} \frac{\partial a^{L-1}_n}{\partial a^{L-2}_p} \ldots \frac{\partial a^{l+1}_q}{\partial a^l_j} \frac{\partial a^l_j}{\partial w^l_{jk}} \Delta w^l_{jk} \label{eq:51}\tag{51} \end{equation} $\partial a/\partial a$ $\partial C/\partial a_m^L$ $C$ $w_{jk}^l$ $C$ \begin{equation} \Delta C \approx \sum_{mnp\ldots q} \frac{\partial C}{\partial a^L_m} \frac{\partial a^L_m}{\partial a^{L-1}_n} \frac{\partial a^{L-1}_n}{\partial a^{L-2}_p} \ldots \frac{\partial a^{l+1}_q}{\partial a^l_j} \frac{\partial a^l_j}{\partial w^l_{jk}} \Delta w^l_{jk} \label{eq:52}\tag{52} \end{equation} ~\eqref{eq:47} \begin{equation} \frac{\partial C}{\partial w^l_{jk}} = \sum_{mnp\ldots q} \frac{\partial C}{\partial a^L_m} \frac{\partial a^L_m}{\partial a^{L-1}_n} \frac{\partial a^{L-1}_n}{\partial a^{L-2}_p} \ldots \frac{\partial a^{l+1}_q}{\partial a^l_j} \frac{\partial a^l_j}{\partial w^l_{jk}} \label{eq:53}\tag{53} \end{equation} ~\eqref{eq:53} $C$ \gls*{weight} \gls*{weight} $\partial a_j^l/\partial w_{jk}^l$ $\partial C/\partial w_{jk}^l$ \gls*{weight} \begin{center} \includegraphics{tikz27} \end{center} \gls*{weight} ~\eqref{eq:53} \gls*{bp}\gls*{bp} \gls*{bp}\gls*{weight}\gls*{bias} \gls*{bp} ~~\gls*{bp} \gls*{bp} \footnote{ ~\eqref{eq:53} $a_q^{l+1}$ $z^{l+1}_q$ $a_q^{l+1}$ } ```
/content/code_sandbox/chap2.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
8,685
```tex % cjkfonts.sty % % A XeLaTeX package for typesetting CJK documents. % % Options: % default: boolean option, cjkfonts is set as the default font family and as the sans serif family for CJK text. % Identification % ============== \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{cjkfonts}[2015/12/12 A simple XeLaTeX package to set CJK fonts] % Required Packages % ================= \RequirePackage{ifthen} \RequirePackage{xeCJK} % Set key-value options \RequirePackage{kvoptions} \DeclareBoolOption[false]{default} \ProcessKeyvalOptions* %% Configuration for parindent %% =========================== \def\elegant@CJKChar@size{\hskip \f@size \p@} \newdimen\elegant@CJKChar@size@dimen \settowidth\elegant@CJKChar@size@dimen{\elegant@CJKChar@size\CJKglue} \setlength{\parindent}{2\elegant@CJKChar@size@dimen} %% Configuration for fonts %% ======================= \newCJKfontfamily[NotoSansSC]\NotoSansSC[ UprightFont=NotoSansCJKsc-Light, BoldFont=NotoSansCJKsc-Bold, ItalicFont=NotoSansCJKsc-Light, BoldItalicFont=NotoSansCJKsc-Bold, ItalicFeatures=FakeSlant, BoldItalicFeatures=FakeSlant]{NotoSansSC} \newCJKfontfamily[NotoSansMonoSC]\NotoSansMonoSC[ UprightFont=NotoSansMonoCJKsc-Regular, BoldFont=NotoSansMonoCJKsc-Bold, ItalicFont=NotoSansMonoCJKsc-Regular, BoldItalicFont=NotoSansMonoCJKsc-Bold, ItalicFeatures=FakeSlant, BoldItalicFeatures=FakeSlant]{NotoSansMonoSC} \newCJKfontfamily[NotoSansSCThin]\NotoSansSCThin[ UprightFont=NotoSansCJKsc-Thin, AutoFakeSlant=true]{NotoSansSC} \newCJKfontfamily[NotoSansSCLight]\NotoSansSCLight[ UprightFont=NotoSansCJKsc-Light, AutoFakeSlant=true]{NotoSansSC} \newCJKfontfamily[NotoSansSCDemiLight]\NotoSansSCDemiLight[ UprightFont=NotoSansCJKsc-DemiLight, AutoFakeSlant=true]{NotoSansSC} \newCJKfontfamily[NotoSansSCRegular]\NotoSansSCRegular[ UprightFont=NotoSansCJKsc-Regular, AutoFakeSlant=true]{NotoSansSC} \newCJKfontfamily[NotoSansSCMedium]\NotoSansSCMedium[ UprightFont=NotoSansCJKsc-Medium, AutoFakeSlant=true]{NotoSansSC} \newCJKfontfamily[NotoSansSCBold]\NotoSansSCBold[ UprightFont=NotoSansCJKsc-Bold, AutoFakeSlant=true]{NotoSansSC} \newCJKfontfamily[NotoSansSCBlack]\NotoSansSCBlack[ UprightFont=NotoSansCJKsc-Black, AutoFakeSlant=true]{NotoSansSC} \newCJKfontfamily[NotoSansMonoSCRegular]\NotoSansMonoSCRegular[ UprightFont=NotoSansMonoCJKsc-Regular, AutoFakeSlant=true]{NotoSansMonoSCRegular} \newCJKfontfamily[NotoSansMonoSCBold]\NotoSansMonoSCBold[ UprightFont=NotoSansMonoCJKsc-Bold, AutoFakeSlant=true]{NotoSansMonoSCBold} \newCJKfontfamily[NotoSerifSC]\NotoSerifSC[ UprightFont=NotoSerifCJKsc-Light, BoldFont=NotoSerifCJKsc-Bold, ItalicFont=NotoSerifCJKsc-Light, BoldItalicFont=NotoSerifCJKsc-Bold, ItalicFeatures=FakeSlant, BoldItalicFeatures=FakeSlant]{NotoSerifSC} \newCJKfontfamily[NotoSerifSCThin]\NotoSerifSCThin[ UprightFont=NotoSerifCJKsc-Thin, AutoFakeSlant=true]{NotoSerifSC} \newCJKfontfamily[NotoSerifSCLight]\NotoSerifSCLight[ UprightFont=NotoSerifCJKsc-Light, AutoFakeSlant=true]{NotoSerifSC} \newCJKfontfamily[NotoSerifSCDemiLight]\NotoSerifSCDemiLight[ UprightFont=NotoSerifCJKsc-DemiLight, AutoFakeSlant=true]{NotoSerifSC} \newCJKfontfamily[NotoSerifSCRegular]\NotoSerifSCRegular[ UprightFont=NotoSerifCJKsc-Regular, AutoFakeSlant=true]{NotoSerifSC} \newCJKfontfamily[NotoSerifSCMedium]\NotoSerifSCMedium[ UprightFont=NotoSerifCJKsc-Medium, AutoFakeSlant=true]{NotoSerifSC} \newCJKfontfamily[NotoSerifSCBold]\NotoSerifSCBold[ UprightFont=NotoSerifCJKsc-Bold, AutoFakeSlant=true]{NotoSerifSC} \newCJKfontfamily[NotoSerifSCBlack]\NotoSerifSCBlack[ UprightFont=NotoSerifCJKsc-Black, AutoFakeSlant=true]{NotoSerifSC} \ifthenelse{\boolean{cjkfonts@default}}{ \setCJKmainfont[ UprightFont={NotoSerifCJKsc-Light}, BoldFont={NotoSerifCJKsc-Bold}, ItalicFont={NotoSerifCJKsc-Light}, BoldItalicFont={NotoSerifCJKsc-Bold}, ItalicFeatures=FakeSlant, BoldItalicFeatures=FakeSlant]{NotoSerifSC} \setCJKsansfont[ UprightFont={NotoSansCJKsc-Light}, BoldFont={NotoSansCJKsc-Bold}, ItalicFont={NotoSansCJKsc-Light}, BoldItalicFont={NotoSansCJKsc-Bold}, ItalicFeatures=FakeSlant, BoldItalicFeatures=FakeSlant]{NotoSansSC} \setCJKmonofont[ UprightFont={NotoSansCJKsc-Light}, BoldFont={NotoSansCJKsc-Bold}, ItalicFont={NotoSansCJKsc-Light}, BoldItalicFont={NotoSansCJKsc-Bold}, ItalicFeatures=FakeSlant, BoldItalicFeatures=FakeSlant]{NotoSansMonoSC} }{} %% This must be the last command \endinput ```
/content/code_sandbox/cjkfonts.sty
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
1,527
```tex % file: preface.tex \chapter{} \label{chap:Introduction} \begin{itemize} \item \item \end{itemize} \hyperref[ch:About]{} \hyperref[ch:UsingNeuralNetsToRecognizeHandwrittenDigits]{} ```
/content/code_sandbox/preface.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
62
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,a4paper,oneside]{book} \usepackage[margin=2.5cm]{geometry} \input{main} ```
/content/code_sandbox/nndl-ebook.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
53
```tex % file: acknowledgements.tex \chapter{} \label{ch:acknowledgements} Paul BlooreChris DawsonAndrew DohertyIlya GrigorikAlex KosorukoffChris Olah Rob Spekkens Rob Chris Yoshua Bengio ```
/content/code_sandbox/acknowledgements.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
58
```tex % file: faq.tex \chapter{Frequently Asked Questions} \begin{center} \begin{tikzpicture}[ inner sep=0pt, minimum size=10mm, background rectangle/.style={ draw=gray!25, fill=gray!10, rounded corners }, show background rectangle] %\pgfkeys{/pgf/number format/showpos,precision=2,use period} \node(o) {\footnotesize Number: $\pgfmathprintnumber{0.012345}$}; \end{tikzpicture} \end{center} ```
/content/code_sandbox/faq.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
137
```tex % file: chap5.tex \chapter{} \label{ch:WhyHardToTrain} {\serif AND}{\serif OR} \begin{center} \includegraphics{shallow_circuit} \end{center} {\serif AND}{\serif NAND}~~ {\serif AND} \begin{center} \includegraphics{circuit_multiplication} \end{center} 1980\footnote{ Johan Hstad 2012 \href{path_to_url}{On the correlation of parity and small-depth circuits} } \begin{center} \includegraphics{tikz35} \end{center} 98\% \begin{center} \includegraphics{tikz36} \end{center} \footnote{Razvan Pascanu, Guido Montfar, and Yoshua Bengio 2014 \href{path_to_url}{On the number of response regions of deep feed forward networks with piece-wise linear activations} Yoshua Bengio 2009 \href{path_to_url~bengioy/papers/ftml_book.pdf}{Learning deep architectures for AI} } ~~\hyperref[ch:HowTheBackpropagationAlgorithmWorks]{}% \hyperref[sec:learning_with_gradient_descent]{}~~ \section{} \label{sec:the_vanishing_gradient_problem} MNIST \footnote{ MNIST % \hyperref[sec:learning_with_gradient_descent]{}% \hyperref[sec:implementing_our_network_to_classify_digits]{}} Python 2.7Numpy \begin{lstlisting}[language=sh] git clone path_to_url \end{lstlisting} \lstinline!git!% \href{path_to_url}{ } \lstinline!src! Python MNIST \begin{lstlisting}[language=Python] >>> import mnist_loader >>> training_data, validation_data, test_data = \ ... mnist_loader.load_data_wrapper() \end{lstlisting} \begin{lstlisting}[language=Python] >>> import network2 >>> net = network2.Network([784, 30, 10]) \end{lstlisting} 784 $28 \times 28 = 784$ 30 10 10 MNIST ('0', '1', '2', ..., 9) 30 \gls*{epoch}\gls*{mini-batch} 10 $\eta = 0.1$ \gls*{regularization} $\lambda = 5.0$ \lstinline!validation_data! \footnote{ } \begin{lstlisting}[language=Python] >>> net.SGD(training_data, 30, 10, 0.1, lmbda=5.0, ... evaluation_data=validation_data, monitor_evaluation_accuracy=True) \end{lstlisting} 96.48\% 30 \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 30, 30, 10]) >>> net.SGD(training_data, 30, 10, 0.1, lmbda=5.0, ... evaluation_data=validation_data, monitor_evaluation_accuracy=True) \end{lstlisting} 96.90\% \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 30, 30, 30, 10]) >>> net.SGD(training_data, 30, 10, 0.1, lmbda=5.0, ... evaluation_data=validation_data, monitor_evaluation_accuracy=True) \end{lstlisting} 96.57\% \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 30, 30, 30, 30, 10]) >>> net.SGD(training_data, 30, 10, 0.1, lmbda=5.0, ... evaluation_data=validation_data, monitor_evaluation_accuracy=True) \end{lstlisting} 96.53\% \footnote{% \hyperref[identity_neuron]{}} $[784, 30, 30, 10]$ $30$ $\frac{\partial C}{\partial b}$ % \hyperref[sec:the_four_fundamental_equations_behind_backpropagation]{} $6$ \footnote{ \href{path_to_url}{\lstinline!generate_gradient.py!} } \begin{center} \includegraphics{initial_gradient} \end{center} $\delta_j^l = \partial C/\partial b_j^l$ $l$ $j$ $\delta^1$ $\delta^2$ $||\delta^1||$ $||\delta^2||$ $||\delta^1|| = 0.07$ $||\delta^2|| = 0.31$ $[784, 30, 30, 10]$ $0.012, 0.060, 0.283$ 30 $0.003, 0.017, 0.070, 0.285$ \begin{center} \includegraphics[width=.6\textwidth]{training_speed_2_layers} \end{center} $1000$ $500$ batch ~~ minibatch $1000$ $50,000$ minibatch $[784, 30, 30, 30, 10]$ \begin{center} \includegraphics[width=.6\textwidth]{training_speed_3_layers} \end{center} $[784, 30, 30, 30, 30, 10]$ \begin{center} \includegraphics[width=.6\textwidth]{training_speed_4_layers} \end{center} $100$ % \gls*{bp} \textbf{ }\footnote{ \href{path_to_url}{Gradient flow in recurrent nets: the difficulty of learning long-term dependencies} Sepp HochreiterYoshua Bengio Paolo Frasconi Jrgen Schmidhuber 2001\gls*{rnn} Sepp Hochreiter \href{path_to_url~juergen/SeppHochreiter1991ThesisAdvisorSchmidhuber.pdf}{Untersuchungen zu dynamischen neuronalen Netzen} 1991} ~~\textbf{} % \textbf{} $f(x)$ $f'(x)$ MNIST \section{} \label{sec:your_sha256_hashs_in_deep_neural_nets} \begin{center} \includegraphics{tikz37} \end{center} $w_1, w_2, \ldots$ $b_1, b_2, \ldots$ $C$ $j$ $a_j = \sigma(z_j)$ $\sigma$ \hyperref[sigmoid_neurons]{S } $z_j = w_j * a_{j-1} + b_j$ $C$ $a_4$ $\partial C/\partial b_1$ $\partial C/\partial b_1$ $\partial C/\partial b_1$ \begin{center} \includegraphics{tikz38} \end{center} $\sigma'(z_j)$ $w_j$ $\partial C/\partial a_4$ $b_1$ $\Delta b_1$ $\Delta a_1$ $\Delta z_2$ $\Delta a_2$ $\Delta C$ \begin{equation} \frac{\partial C}{\partial b_1} \approx \frac{\Delta C}{\Delta b_1} \label{eq:114}\tag{114} \end{equation} $\partial C/\partial b_1$ $\Delta b_1$ $a_1$ $a_1 = \sigma(z_1) = \sigma(w_1 a_0 + b_1)$ \begin{align} \Delta a_1 & \approx \frac{\partial \sigma(w_1 a_0+b_1)}{\partial b_1} \Delta b_1 \label{eq:115}\tag{115}\\ & = \sigma'(z_1) \Delta b_1 \label{eq:116}\tag{116} \end{align} $\sigma'(z_1)$ $\partial C/\partial b_1$ $\Delta b_1$ $\Delta a_1$$\Delta a_1$ $z_2 = w_2 * a_1 + b_2$: \begin{align} \Delta z_2 & \approx \frac{\partial z_2}{\partial a_1} \Delta a_1 \label{eq:117}\tag{117}\\ & = w_2 \Delta a_1 \label{eq:118}\tag{118} \end{align} $\Delta z_2$ $\Delta a_1$ $b_1$ $z_2$ \begin{equation} \Delta z_2 \approx \sigma'(z_1) w_2 \Delta b_1 \label{eq:119}\tag{119} \end{equation} $\partial C/\partial b_1$ $\sigma'(z_j)$ $w_j$ $\Delta C$ $\Delta b_1$ \begin{equation} \Delta C \approx \sigma'(z_1) w_2 \sigma'(z_2) \ldots \sigma'(z_4) \frac{\partial C}{\partial a_4} \Delta b_1 \label{eq:120}\tag{120} \end{equation} $\Delta b_1$ \begin{equation} \frac{\partial C}{\partial b_1} = \sigma'(z_1) w_2 \sigma'(z_2) \ldots \sigma'(z_4) \frac{\partial C}{\partial a_4} \label{eq:121}\tag{121} \end{equation} \textbf{} \begin{equation} \frac{\partial C}{\partial b_1} = \sigma'(z_1) \, w_2 \sigma'(z_2) \, w_3 \sigma'(z_3) \, w_4 \sigma'(z_4) \, \frac{\partial C}{\partial a_4} \label{eq:122}\tag{122} \end{equation} $w_j \sigma'(z_j)$ sigmoid \begin{center} \includegraphics{sigmoid_prime_graph} \end{center} $\sigma'(0)=1/4$ $0$ $1$ $|w_j| < 1$ $w_j \sigma'(z_j) < 1/4$ ** $\partial C/\partial b_1$ $\partial C/\partial b_3$ \begin{center} \includegraphics{tikz39} \end{center} $\partial C/\partial b_1$ $< 1/4$ $\partial C/\partial b_1$ $\partial C/\partial b_3$ 1/16 $w_j$ $w_j \sigma'(z_j)$ $w_j \sigma'(z_j) < 1/4$ 1% \gls*{bp} \\ \textbf{} $w_1 = w_2 = w_3 = w_4 = 100$ $\sigma'(z_j)$ $z_j = 0$ $sigma'(z_j) = 1/4$ $z_1 = w_1 * a_0 + b_1$ $b_1 = -100 * a_0$ $w_j * \sigma'(z_j)$ $100*1/4 = 25$\\ \textbf{} \textbf{} \subsection*{} \begin{itemize} \item $|\sigma'(z)| < 1/4$ \end{itemize} \textbf{} sigmoid $|w\sigma'(z)|$ $|w\sigma'(z)| >= 1$ $w$ $\sigma'(z)$ $w$$\sigma'(z) = \sigma'(w*a+b)$ $a$ $w$ $\sigma'(wa+b)$ $w$ $wa + b$ $\sigma'$ $\sigma'$ \subsection*{} \begin{itemize} \item $|w\sigma'(wa+b)|$ $|w\sigma'(wa+b)| >= 1$1 $|w| >= 4$ 2 $|w| >= 4$ $|w\sigma'(wa+b)| >= 1$ $a$ $\frac{2}{|w|}\ln(\frac{|w|(1+\sqrt{1-4/|w|})}{2}-1)$ 3 $|w| ~= 6.9$ $0.45$ \item \textbf{}\label{identity_neuron} $x$ $w_1$ $b$ $w_2$ $w_2 \sigma(w_1*x +b)~=x$ $x \in [0, 1]$ \textbf{ $x = 1/2 + \Delta$ $w_1$ $w_1 * \Delta$ } \end{itemize} \section{} \begin{center} \includegraphics{tikz40} \end{center} $L$ $l$ \begin{equation} \delta^l = \Sigma'(z^l) (w^{l+1})^T \Sigma'(z^{l+1}) (w^{l+2})^T \ldots \Sigma'(z^L) \nabla_a C \label{eq:124}\tag{124} \end{equation} $\Sigma'(z^l)$ $l$ $\sigma'(z)$ $w^l$ $\nabla_{a} C$ $(w^j)^T \Sigma' (z^j)$ (pair) $\Sigma'(z^j)$ $1/4$ $w^j$ $(w^j)^T \sigma' (z^l)$ sigmoid \section{} ~~ 2010 Glorot Bengio\footnote{\href{path_to_url}{Understanding the difficulty of training deep feedforward neural networks} Xavier Glorot Yoshua Bengio2010 \href{path_to_url}{Efficient BackProp} S Yann LeCun Lon Bottou Genevieve Orr Klaus-Robert Mller1998} sigmoid sigmoid $0$ sigmoid 2013 Sutskever, Martens, Dahl Hinton\footnote{\href{path_to_url~hinton/absps/momentum.pdf}{On the importance of initialization and momentum in deep learning} Ilya SutskeverJames Martens George Dahl Geoffrey Hinton 2013} momentum $SGD$ ```
/content/code_sandbox/chap5.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
3,454
```tex % file: copyright.tex \chapter{} \href{path_to_url}{path_to_url} Michael A. Nielsen, ``Neural Networks and Deep Learning'', Determination Press, 2015 \href{path_to_url}{Creative \href{mailto:mn@michaelnielsen.org}{} \hyperref[sec:TranslationTeam]{} ```
/content/code_sandbox/copyright.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
76
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode % your_sha256_hash-------------- % customize the headers with fancyhdr package % your_sha256_hash-------------- \usepackage{fancyhdr} \fancyhf{} \fancyhead[LE]{\leftmark} \fancyhead[RO]{\nouppercase{\rightmark}} \fancyfoot[LE,RO]{\thepage} \pagestyle{fancy} % your_sha256_hash-------------- % Index package % your_sha256_hash-------------- % \usepackage{makeidx} % \makeindex % your_sha256_hash-------------- % load hyperref to use hyperlinks % your_sha256_hash-------------- \usepackage[colorlinks=true,linkcolor=blue]{hyperref} \usepackage[all]{hypcap} % Be sure to call this package after loading hyperref. % your_sha256_hash-------------- % Glossaries, must be after hyperref % your_sha256_hash-------------- \usepackage[xindy,toc]{glossaries} \makeglossaries{} % your_sha256_hash-------------- % load tocbibind to add contents,list of figures, list of tables and % bibliography into the toc % your_sha256_hash-------------- \usepackage{tocbibind} % your_sha256_hash-------------- % Needed to load images % your_sha256_hash-------------- \usepackage{graphicx} \graphicspath{ {images/} } % where to look for images \usepackage{color} \usepackage{tabularx} \usepackage{multirow} \usepackage{framed} % your_sha256_hash-------------- % for code example % your_sha256_hash-------------- \usepackage{listings} \definecolor{syntax_comment}{rgb}{0.72,0.14,0.15} % red \definecolor{syntax_key}{rgb}{0.05,0.5,0.07} \definecolor{syntax_gray}{rgb}{0.5,0.5,0.5} \definecolor{syntax_string}{rgb}{0.58,0,0.82} % mauve \definecolor{background}{rgb}{0.975,0.975,0.975} \lstset{ % backgroundcolor=\color{background}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor} basicstyle=\scriptsize\ttfamily, % the size of the fonts that are used for the code breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace breaklines=true, % sets automatic line breaking captionpos=b, % sets the caption-position to bottom commentstyle=\itshape\color{syntax_comment}, % comment style % deletekeywords={...}, % if you want to delete keywords from the given language % escapeinside={\%*}{*)}, % if you want to add LaTeX within your code extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 % frame=single, % adds a frame around the code keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) keywordstyle=\color{syntax_key}, % keyword style % language=Octave, % the language of the code % otherkeywords={*,...}, % if you want to add more keywords to the set numbers=none, % where to put the line-numbers; possible values are (none, left, right) numbersep=5pt, % how far the line-numbers are from the code numberstyle=\tiny\color{syntax_gray}, % the style that is used for the line-numbers rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' showstringspaces=false, % underline spaces within strings only showtabs=false, % show tabs within strings adding particular underscores stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered stringstyle=\color{syntax_string}, % string literal style tabsize=2 % sets default tabsize to 2 spaces % title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title } % your_sha256_hash-------------- % for long and nice table % your_sha256_hash-------------- \usepackage{longtable} \usepackage{booktabs} \usepackage{ltxtable} % your_sha256_hash-------------- % for compact item list % your_sha256_hash-------------- \usepackage{paralist} % your_sha256_hash-------------- % Math - Warning: before cjkfonts (xeCJK) and other package loads fontspec % your_sha256_hash-------------- \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} % font selection for mathematics with XeLaTeX, MUST after amsfonts \usepackage{mathspec} % \setmathsfont(Digits,Latin,Greek)[Numbers={Lining,Proportional}]{Minion Pro} % There's no italic sans-serif math font by default, but it's needed in this book % follow: path_to_url % to define a \mathsfit{} macro \DeclareMathAlphabet{\mathsfit}{\encodingdefault}{\sfdefault}{m}{sl} \SetMathAlphabet{\mathsfit}{bold}{\encodingdefault}{\sfdefault}{bx}{sl} % your_sha256_hash-------------- % Localization setting % your_sha256_hash-------------- \input{localization.tex} % Set Roboto and Source Code Pro, which are installed with TexLive, for western % fonts: \input{westernfonts.tex} \usepackage{setspace} \onehalfspacing{} %\usepackage{tikz} % load TikZ/PGF %\usetikzlibrary{circuits.logic.US,positioning,decorations.pathreplacing,mindmap,backgrounds,math} \usepackage{pgfplots} % load PDFPlots %\pgfplotsset{compat=yourversion} % your_sha256_hash-------------- % Load glossaries % your_sha256_hash-------------- \input{glossaries} \input{plots} % your_sha256_hash-------------- % The document body % your_sha256_hash-------------- \begin{document} \input{title} \frontmatter %\maketitle \input{copyright} \tableofcontents %\listoffigures %\listoftables \pagebreak \input{author} \input{translation} \input{preface} \input{about} \input{exercises_and_problems} \mainmatter{} \input{chap1} \input{chap2} \input{chap3} \input{chap4} \input{chap5} \input{chap6} \appendix \input{sai} \input{acknowledgements} %\input{faq} \input{history} \backmatter{} % \printindex \printglossary[title={}] \end{document} ```
/content/code_sandbox/main.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
1,600
```tex \begin{lstlisting}[language=Python] $ python expand_mnist.py \end{lstlisting} ```
/content/code_sandbox/snippets/run_expand_mnist.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
24
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \crossEntropyCostLearning{2.0}{2.0}{0.005}{0} \end{document} ```
/content/code_sandbox/images/saturation4-0.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \quadraticCostLearning{0.6}{0.9}{0.15}{300} \end{document} ```
/content/code_sandbox/images/saturation1-300.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{math} \begin{document} % borrow the code from path_to_url \begin{tikzpicture}[scale=.06pt] \tikzmath{ % -------------------------- % the parameters of the tree % -------------------------- \power=2.5; % the scale base factor \deviation=44.5; % the angle between the 3 child edges \numsteps=5; % number of levels let \startcolor=magenta; % the start color let \endcolor=black; % the end color % your_sha256_hash--------- % the function that draw one edge and call itself to draw the 3 child edges % your_sha256_hash--------- function Branch(\x,\y,\rotate,\step){ \step=\step-1; % stops drawing if step < 0 if (\step >= 0) then { \mix = int(100*\step/(\numsteps-1)); % the color mix parameter is in [0,100] \scale = \power^\step; % the scale factor { % "print" the tikz command that draw the edge \draw[shift={(\x pt,\y pt)}, rotate=\rotate, scale=\scale, color=\startcolor!\mix!\endcolor, line width=\scale*.1 pt, line cap=round] (0,0)--(1,0) coordinate(newbase); }; coordinate \b; \b1 = (newbase); % the new base point for \a in {-\deviation,0,\deviation}{ Branch(\bx1,\by1,mod(\rotate+\a,360),\step); % draw one child edge }; }; }; % ---------------------- % draw the four branches % ---------------------- for \angle in {0,45,...,360}{ Branch(0,0,\angle,\numsteps); }; } \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/cayley.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
481
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \quadraticCostLearning{2.0}{2.0}{0.15}{200} \end{document} ```
/content/code_sandbox/images/saturation2-200.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```tex % file: chap3.tex \chapter{} \label{ch:ImprovingTheWayNeuralNetworksLearn} % \gls*{bp} \gls*{cost-func}~~% \hyperref[sec:the_cross-entropy_cost_function]{}\gls*{cost-func}% \hyperref[sec:overfitting_and_regularization]{\gls*{regularization}}L1 L2 \gls*{regularization} \gls*{dropout}% \hyperref[sec:weight_initialization]{\gls*{weight}}% \hyperref[sec:how_to_choose_a_neural_network's_hyper-parameters]{ }% \hyperref[sec:other_techniques]{} % \hyperref[sec:handwriting_recognition_revisited_the_code]{} \hyperref[ch:UsingNeuralNetsToRecognizeHandwrittenDigits]{} \section{} \label{sec:the_cross-entropy_cost_function} \begin{center} \includegraphics{tikz28} \end{center} $1$ $0$ \gls*{weight}\gls*{bias} \gls*{weight}\gls*{bias} \gls*{weight}\gls*{bias} $0.6$ $0.9$ $0.82$ $0.0$ $0.0$ % \gls*{weight}\gls*{bias}\gls*{learning-rate} $\eta=0.15$ \gls*{cost-func}$C$ \begin{center} \includegraphics{saturation1-0} \end{center} \gls*{epoch}\gls*{weight}\gls*{bias} \begin{center} \includegraphics{saturation1-50}\includegraphics{saturation1-100}\\ \includegraphics{saturation1-150}\includegraphics{saturation1-200}\\ \includegraphics{saturation1-250}\includegraphics{saturation1-300} \end{center} \gls*{cost-func}\gls*{weight}\gls*{bias} $0.09$ $0.0$ \gls*{weight}\gls*{bias} $2.0$ $0.98$ \begin{center} \includegraphics{saturation2-0} \end{center} \label{saturation2_anchor} \begin{center} \includegraphics{saturation2-50}\includegraphics{saturation2-100}\\ \includegraphics{saturation2-150}\includegraphics{saturation2-200}\\ \includegraphics{saturation2-250}\includegraphics{saturation2-300} \end{center} \gls*{learning-rate}$\eta=0.15$ $150$ \gls*{weight}\gls*{bias} $0.0$ \gls*{weight}\gls*{bias} \gls*{cost-func}$\partial C/\partial w$ $\partial C/\partial b$ ~\eqref{eq:6}\gls*{cost-func} \begin{equation} C = \frac{(y-a)^2}{2} \label{eq:54}\tag{54} \end{equation} $a$ $x=1$$y=0$ % \gls*{weight} $a = \sigma(z)$ $z = wx+b$ \gls*{weight}\gls*{bias} \begin{align} \frac{\partial C}{\partial w} &= (a-y)\sigma'(z) x = a \sigma'(z)\label{eq:55}\tag{55}\\ \frac{\partial C}{\partial b} &= (a-y)\sigma'(z) = a \sigma'(z)\label{eq:56}\tag{56} \end{align} $x = 1$ $y = 0$ $\sigma'(z)$ $\sigma$ \begin{center} \includegraphics{sigmoid_function} \end{center} $1$ $\sigma'(z)$ ~\eqref{eq:55} ~\eqref{eq:56} $\partial C/\partial w$ $\partial C/\partial b$ \subsection{} \label{sec:introducing_the_cross-entropy_cost_function} \gls*{cost-func} $x_1, x_2, \ldots$ \gls*{weight} $w_1, w_2, \ldots$ \gls*{bias} $b$ \begin{center} \includegraphics{tikz29} \end{center} $a = \sigma(z)$ $z = \sum_j w_j x_j+b$ \gls*{cost-func} \begin{equation} C = -\frac{1}{n} \sum_x \left[y \ln a + (1-y ) \ln (1-a) \right] \label{eq:57}\tag{57} \end{equation} $n$ $x$ $y$ ~\eqref{eq:57} \gls*{cost-func} \gls*{cost-func} \gls*{cost-func}$C > 0$a \eqref{eq:57} $(0,1)$ b $x$ $0$\footnote{ $y$ $0$$1$ }$y=0$ $a\approx 0$ \eqref{eq:57} $y=0$ $-\ln (1-a)\approx 0$$y=1$ $a\approx 1$ $0$ \gls*{cost-func}\gls*{cost-func} \gls*{cost-func}\gls*{cost-func} \gls*{weight} $a=\sigma(z)$ \eqref{eq:57} \begin{align} \frac{\partial C}{\partial w_j} &= -\frac{1}{n} \sum_x \left( \frac{y }{\sigma(z)} -\frac{(1-y)}{1-\sigma(z)} \right) \frac{\partial \sigma}{\partial w_j} \label{eq:58}\tag{58}\\ &= -\frac{1}{n} \sum_x \left( \frac{y}{\sigma(z)} -\frac{(1-y)}{1-\sigma(z)} \right)\sigma'(z) x_j \label{eq:59}\tag{59} \end{align} \begin{equation} \frac{\partial C}{\partial w_j} = \frac{1}{n} \sum_x \frac{\sigma'(z) x_j}{\sigma(z) (1-\sigma(z))} (\sigma(z)-y) \label{eq:60}\tag{60} \end{equation} $\sigma(z) = 1/(1+e^{-z})$ $\sigma'(z) = \sigma(z)(1-\sigma(z))$ $\sigma'(z)$ $\sigma(z)(1-\sigma(z))$ \begin{equation} \frac{\partial C}{\partial w_j} = \frac{1}{n} \sum_x x_j(\sigma(z)-y) \label{eq:61}\tag{61} \end{equation} \gls*{weight} $\sigma(z)-y$ \gls*{cost-func}\gls*{cost-func} $\sigma'(z)$ ~\eqref{eq:55}$\sigma'(z)$ \gls*{bias} \begin{equation} \frac{\partial C}{\partial b} = \frac{1}{n} \sum_x (\sigma(z)-y) \label{eq:62}\tag{62} \end{equation} ,\gls*{cost-func}~\eqref{eq:56} $\sigma'(z)$ \subsection*{} \begin{itemize} \item $\sigma'(z) = \sigma(z)(1-\sigma(z))$ \end{itemize} \gls*{weight} $0.6$\gls*{bias} $0.9$ \begin{center} \includegraphics{saturation3-0} \end{center} \begin{center} \includegraphics{saturation3-50}\includegraphics{saturation3-100}\\ \includegraphics{saturation3-150}\includegraphics{saturation3-200}\\ \includegraphics{saturation3-250}\includegraphics{saturation3-300} \end{center} \hyperref[saturation2_anchor]{}\gls*{weight}% \gls*{bias}$2.0$ \begin{center} \includegraphics{saturation4-0} \end{center} \begin{center} \includegraphics{saturation4-50}\includegraphics{saturation4-100}\\ \includegraphics{saturation4-150}\includegraphics{saturation4-200}\\ \includegraphics{saturation4-250}\includegraphics{saturation4-300} \end{center} \gls*{cost-func}\gls*{cost-func} \gls*{learning-rate}\gls*{cost-func} $\eta = 0.15$\gls*{learning-rate} \gls*{cost-func}\gls*{learning-rate} \gls*{cost-func} \gls*{learning-rate} $\eta = 0.005$ \gls*{learning-rate}% \gls*{learning-rate} \gls*{cost-func} \gls*{cost-func}% \textbf{} \gls*{learning-rate} $y = y_1, y_2, \ldots$ $a^L_1, a^L_2, \ldots$ \begin{equation} C = -\frac{1}{n} \sum_x \sum_j \left[y_j \ln a^L_j + (1-y_j) \ln (1-a^L_j) \right] \label{eq:63}\tag{63} \end{equation} $\sum_j$ ~\eqref{eq:57} ~\eqref{eq:63} \gls*{cost-func}% \gls*{sigmoid-neuron} \gls*{weight}\gls*{bias} ~~ $1$ $0$\gls*{cost-func} \gls*{weight} \subsection*{} \begin{itemize} \item $y$ $a$ $-[y \ln a + (1-y) \ln (1-a)]$ $-[a \ln y + (1-a) \ln (1-y)]$ $y=0$ $1$ \item $\sigma(z) \approx y$ $y$ $1$ $0$ $y$ $0$ $1$ $\sigma(z) = y$ \begin{equation} C = -\frac{1}{n} \sum_x [y \ln y+(1-y) \ln(1-y)] \label{eq:64}\tag{64} \end{equation} $-[y \ln y+(1-y)\ln(1-y)]$ % \href{path_to_url}{} \end{itemize} \subsection*{} \begin{itemize} \item \textbf{}\quad % \hyperref[ch:HowTheBackpropagationAlgorithmWorks]{} \gls*{cost-func}\gls*{weight} \begin{equation} \frac{\partial C}{\partial w^L_{jk}} = \frac{1}{n} \sum_x a^{L-1}_k (a^L_j-y_j) \sigma'(z^L_j) \label{eq:65}\tag{65} \end{equation} $\sigma'(z^L_j)$ \gls*{cost-func} $x$ $\delta^L$ \begin{equation} \delta^L = a^L-y \label{eq:66}\tag{66} \end{equation} \gls*{weight} \begin{equation} \frac{\partial C}{\partial w^L_{jk}} = \frac{1}{n} \sum_x a^{L-1}_k (a^L_j-y_j) \label{eq:67}\tag{67} \end{equation} $\sigma'(z^L_j)$ \gls*{bias} \item \textbf{\gls*{cost-func}}\quad \textbf{} \gls*{sigmoid-func} $a^L_j = z^L_j$\gls*{cost-func} $x$ \begin{equation} \delta^L = a^L-y \label{eq:68}\tag{68} \end{equation} \gls*{weight}\gls*{bias} \begin{align} \frac{\partial C}{\partial w^L_{jk}} &= \frac{1}{n} \sum_x a^{L-1}_k (a^L_j-y_j) \label{eq:69}\tag{69}\\ \frac{\partial C}{\partial b^L_{j}} &= \frac{1}{n} \sum_x (a^L_j-y_j) \label{eq:70}\tag{70} \end{align} \gls*{cost-func} \gls*{cost-func} \end{itemize} \subsection{ MNIST } % \hyperref[sec:handwriting_recognition_revisited_the_code]{}% \hyperref[sec:implementing_our_network_to_classify_digits]{} \lstinline!network.py! \lstinline!network2.py! \footnote{ \href{path_to_url}{GitHub} } MNIST $30$ \gls*{mini-batch} $10$\gls*{learning-rate} $\eta=0.5$ \footnote{ $\eta = 3.0$ \gls*{learning-rate} \gls*{cost-func} \gls*{learning-rate} \gls*{learning-rate} $\sigma' = \sigma(1-\sigma)$ $\sigma$ $\int_0^1 d\sigma \sigma(1-\sigma) = 1/6$% \gls*{learning-rate} $6$ \gls*{learning-rate} $6$ } $30$ \gls*{epoch} \lstinline!network2.py! \lstinline!network.py! \lstinline!help(network2.Network.SGD)! \lstinline!network2.py! \begin{lstlisting}[language=Python] >>> import mnist_loader >>> training_data, validation_data, test_data = \ ... mnist_loader.load_data_wrapper() >>> import network2 >>> net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost) >>> net.large_weight_initializer() >>> net.SGD(training_data, 30, 10, 0.5, evaluation_data=test_data, ... monitor_evaluation_accuracy=True) \end{lstlisting} \lstinline!net.large_weight_initializer()! \gls*{weight}\gls*{bias} \gls*{weight} 95.49\% \gls*{cost-func} 95.42\% $100$ 96.82\% \gls*{cost-func} 96.59\% 3.41\% 3.18\% $1/14$ \gls*{cost-func} \gls*{mini-batch} MNIST ~~% \hyperref[sec:overfitting_and_regularization]{\gls*{regularization}} \gls*{cost-func} \subsection{} ~\eqref{eq:55} ~\eqref{eq:56} $\sigma'(z)$ $\sigma'(z)$ $x$ $C = C_x$ \begin{align} \frac{\partial C}{\partial w_j} &= x_j(a-y) \label{eq:71}\tag{71}\\ \frac{\partial C}{\partial b } &= (a-y) \label{eq:72}\tag{72} \end{align} \gls*{cost-func} \begin{equation} \frac{\partial C}{\partial b} = \frac{\partial C}{\partial a} \sigma'(z) \tag{73} \end{equation} $\sigma'(z) = \sigma(z)(1-\sigma(z)) = a(1-a)$ \begin{equation} \frac{\partial C}{\partial b} = \frac{\partial C}{\partial a} a(1-a) \label{eq:74}\tag{74} \end{equation} ~\eqref{eq:72} \begin{equation} \frac{\partial C}{\partial a} = \frac{a-y}{a(1-a)} \label{eq:75}\tag{75} \end{equation} $a$ \begin{equation} C = -[y \ln a + (1-y) \ln (1-a)]+ {\rm constant} \label{eq:76}\tag{76} \end{equation} {\rm constant} $x$ \gls*{cost-func} \gls*{cost-func} \begin{equation} C = -\frac{1}{n} \sum_x [y \ln a +(1-y) \ln(1-a)] + {\rm constant} \label{eq:77}\tag{77} \end{equation} ~\eqref{eq:71} ~\eqref{eq:72} $x \rightarrow y = y(x)$ $x \rightarrow a = a(x)$ $a$ $y = 1$ $1-a$ $y=0$ $y$ % \href{path_to_url#Motivation}{} \href{path_to_url}{Cover and Thomas} Kraft \subsection*{} \begin{itemize} \item \gls*{cost-func} ~\eqref{eq:61} $x_j$ $x_j$ $0$ \gls*{weight} $w_j$ \gls*{cost-func} $x_j$ \end{itemize} \subsection{} \label{subsec:softmax} \textbf{\gls{softmax}} \gls*{softmax}% \gls*{softmax}% \hyperref[ch:Deeplearning]{}\gls*{softmax} \gls*{softmax} S \footnote{\gls*{softmax}% \hyperref[ch:HowTheBackpropagationAlgorithmWorks]{} } $z^L_j = \sum_{k} w^L_{jk} a^{L-1}_k + b^L_j$\gls*{sigmoid-func} \text{\gls{softmax-func}} $z^L_j$ $j$ $a^L_j$ \begin{equation} a^L_j = \frac{e^{z^L_j}}{\sum_k e^{z^L_k}} \label{eq:78}\tag{78} \end{equation} \gls*{softmax-func}~\eqref{eq:78} ~\eqref{eq:78} $z^L_1, z^L_2, z^L_3$ $z^L_4$ $z^L_4$ \begin{center} \includegraphics{softmax} \end{center} $z^L_4$ $a^L_4$ $z^L_4$ $2$ \begin{center} \includegraphics{softmax-1} \end{center} $z^L_4$ $5$ \begin{center} \includegraphics{softmax-2} \end{center} $z^L_4$ $a^L_4$ $z^L_4$ $-2$ \begin{center} \includegraphics{softmax-3} \end{center} $z^L_4$ $-5$ \begin{center} \includegraphics{softmax-4} \end{center} $a^L_4$ $1$ ~\eqref{eq:78} \begin{equation} \sum_j a^L_j = \frac{\sum_j e^{z^L_j}}{\sum_k e^{z^L_k}} = 1 \label{eq:79}\tag{79} \end{equation} $a^L_4$ $1$ ~\eqref{eq:78} $1$ $a^L_j$ $j$ MNIST $a^L_j$ $j$ S S S \subsection*{} \begin{itemize} \item S $a^L_j$ $1$ \end{itemize} ~\eqref{eq:78} ~\eqref{eq:78} \gls*{softmax} $1$ $z^L_j$ \subsection*{} \begin{itemize} \item \textbf{\gls*{softmax}}\quad $j=k$ $\partial a^L_j / \partial z^L_k$ $j \neq k$ $z^L_j$ $a^L_j$ \item \textbf{\gls*{softmax}}\quad S $a^L_j$ $a^L_j = \sigma(z^L_j)$ \gls*{softmax} $a^L_j$ \textbf{} \end{itemize} \subsection*{} \begin{itemize} \item \textbf{\gls*{softmax}}\quad \gls*{softmax} $a^L_j$ $z^L_j = \ln a^L_j + C$ $C$ $j$ \end{itemize} \textbf{} \textbf{\gls{log-likelihood}}\gls*{cost-func} $x$ $y$ \gls*{log-likelihood}\gls*{cost-func} \begin{equation} C \equiv -\ln a^L_y \label{eq:80}\tag{80} \end{equation} MNIST $7$ % \gls*{log-likelihood} $-\ln a_7^L$ $7$ $a_7^L$ $1$ $-\ln a_7^L$ $a_7^L$ $-\ln a_7^L$ \gls*{cost-func} \gls*{cost-func} $\partial C / \partial w^L_{jk}$ $\partial C / \partial b^L_j$ ~~~~ \footnote{ $y$ $y$ 7 $7$ $y$ $7$ 7 $1$ $0$ } \begin{align} \frac{\partial C}{\partial b^L_j} &= a^L_j-y_j \label{eq:81}\tag{81}\\ \frac{\partial C}{\partial w^L_{jk}} &= a^{L-1}_k (a^L_j-y_j) \label{eq:82}\tag{82} \end{align} ~\eqref{eq:82} ~\eqref{eq:67} % \gls*{log-likelihood}\gls*{softmax} S S S \hyperref[ch:Deeplearning]{} MNIST \subsection*{} \begin{itemize} \item ~\eqref{eq:81} ~\eqref{eq:82} \item \textbf{}\quad \begin{equation} a^L_j = \frac{e^{c z^L_j}}{\sum_k e^{c z^L_k}} \label{eq:83}\tag{83} \end{equation} $c$ $c=1$ $c$ $c$ $c\rightarrow \infty$ $a_j^L$ $c=1$ \item \textbf{\gls*{bp}}\quad S \gls*{bp} $\delta^L_j \equiv \partial C / \partial z^L_j$ \begin{equation} \delta^L_j = a^L_j -y_j \label{eq:84}\tag{84} \end{equation} \gls*{bp} \end{itemize} \section{} \label{sec:overfitting_and_regularization} 4 \footnote{ \href{path_to_url}{Freeman Dyson} % \href{path_to_url}{}% } MNIST 30 24,000 100 80,000 30 23,860 50,000 MNIST 1,000 \gls*{cost-func}\gls*{learning-rate} $\eta = 0.5$ \gls*{mini-batch} $10$ 400 \gls*{epoch} \lstinline!network2! \gls*{cost-func} \begin{lstlisting}[language=Python] >>> import mnist_loader >>> training_data, validation_data, test_data = \ ... mnist_loader.load_data_wrapper() >>> import network2 >>> net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost) >>> net.large_weight_initializer() >>> net.SGD(training_data[:1000], 400, 10, 0.5, evaluation_data=test_data, ... monitor_evaluation_accuracy=True, monitor_training_cost=True) \end{lstlisting} \footnote{ \href{path_to_url}{overfitting.py} } \begin{center} \includegraphics[width=.6\textwidth]{overfitting1} \end{center} \gls*{cost-func} $200$ $399$ \gls*{epoch} \begin{center} \includegraphics[width=.6\textwidth]{overfitting2} \end{center} 200 \gls*{epoch} 82\% 280 \gls*{epoch} \gls*{epoch} 280 \gls*{epoch} 280 \gls*{epoch} 280 \gls*{epoch}% \textbf{\gls{overfitting}}\textbf{\gls{overtraining}} \textbf{} \textbf{} \begin{center} \includegraphics[width=.6\textwidth]{overfitting3} \end{center} 15 \gls*{epoch} \gls*{overfitting} 15 280 \gls*{epoch}\gls*{overfitting} 280 \gls*{epoch} \gls*{overfitting} \gls*{overfitting} \begin{center} \includegraphics[width=.6\textwidth]{overfitting4} \end{center} 100\% $1000$ 82.27\% \gls*{overfitting}\gls*{weight} \gls*{bias}\gls*{overfitting} \gls*{overfitting} \gls*{overfitting}~~ \gls*{overfitting} \gls*{overfitting} MNIST \begin{lstlisting}[language=Python] >>> import mnist_loader >>> training_data, validation_data, test_data = \ ... mnist_loader.load_data_wrapper() \end{lstlisting} \lstinline!training_data! \lstinline!test_data! \lstinline!validation_data!\lstinline!validation_data! $10,000$ MNIST $50,000$ $10,000$ \lstinline!validation_data! \lstinline!test_data! \gls*{overfitting} \lstinline!test_data! \gls*{epoch} \lstinline!validation_data! \textbf{ } \footnote{ 280 \gls*{epoch} 400 \gls*{epoch} } \label{validation_explanation} \lstinline!validation_data! \lstinline!test_data! \gls*{overfitting} \lstinline!validation_data! \gls*{epoch}\gls*{learning-rate} % \hyperref[sec:how_to_choose_a_neural_network's_hyper-parameters]{} \lstinline!validation_data! \lstinline!test_data! \gls*{overfitting} \lstinline!validation_data! \lstinline!test_data! \lstinline!test_data! \gls*{overfitting} \lstinline!test_data! \lstinline!test_data! \lstinline!validation_data! \lstinline!test_data! \lstinline!test_data! \textbf{hold out} \lstinline!validation_data! \lstinline!traning_data! \lstinline!test_data! ~~~~ \gls*{overfitting} \lstinline!test_data! \lstinline!training_data!\lstinline!validation_data! \lstinline!test_data! Hold-Out $1,000$ \gls*{overfitting} 50,000 $30$ \gls*{learning-rate} $0.5$\gls*{mini-batch} $10$\gls*{epoch} 30 \begin{center} \includegraphics[width=.6\textwidth]{code_samples/fig/overfitting_full} \end{center} $1,000$ 97.86\% 95.33\% 1.53\% 17.73\%\gls*{overfitting} \gls*{overfitting} \gls*{overfitting} \subsection{} \gls*{overfitting}\gls*{overfitting} \gls*{overfitting} \textbf{\gls{regularization}}\gls*{regularization} ~~\textbf{\gls{weight-decay}} \textbf{L2 \gls*{regularization}}L2 \gls*{regularization} \gls*{cost-func}\textbf{\gls{regularization-term}}\gls*{regularization} \begin{equation} C = -\frac{1}{n} \sum_{xj} \left[ y_j \ln a^L_j+(1-y_j) \ln (1-a^L_j)\right] + \frac{\lambda}{2n} \sum_w w^2 \label{eq:85}\tag{85} \end{equation} \gls*{weight} $\lambda / 2n$ $\lambda > 0$ \textbf{\gls*{regularization}} $n$ $\lambda$ \gls*{regularization}\textbf{}\gls*{bias} \gls*{cost-func}\gls*{regularization}\gls*{cost-func}\gls*{regularization} \begin{equation} C = \frac{1}{2n} \sum_x \|y-a^L\|^2 + \frac{\lambda}{2n} \sum_w w^2 \label{eq:86}\tag{86} \end{equation} \begin{equation} C = C_0 + \frac{\lambda}{2n} \sum_w w^2 \label{eq:87}\tag{87} \end{equation} $C_0$ \gls*{cost-func} \gls*{regularization}\gls*{weight} \gls*{weight}\gls*{cost-func}\gls*{regularization} \gls*{weight}\gls*{cost-func} $\lambda$ $\lambda$ \gls*{cost-func}\gls*{weight} \gls*{overfitting} \gls*{regularization}\gls*{overfitting} \gls*{sgd}\gls*{regularization} \gls*{weight}\gls*{bias} $\partial C/\partial w$ $\partial C/\partial b$~\eqref{eq:87} \begin{align} \frac{\partial C}{\partial w} & = \frac{\partial C_0}{\partial w} + \frac{\lambda}{n} w \label{eq:88}\tag{88} \\ \frac{\partial C}{\partial b} & = \frac{\partial C_0}{\partial b} \label{eq:89}\tag{89} \end{align} $\partial C_0/\partial w$ $\partial C_0/\partial b$ \gls*{bp} \hyperref[ch:HowTheBackpropagationAlgorithmWorks]{} \gls*{regularization}\gls*{cost-func}\gls*{bp} $\frac{\lambda}{n} w$ \gls*{weight}\gls*{bias}\gls*{bias} \begin{equation} b \rightarrow b -\eta \frac{\partial C_0}{\partial b} \label{eq:90}\tag{90} \end{equation} \gls*{weight} \begin{align} w & \rightarrow w-\eta \frac{\partial C_0}{\partial w}-\frac{\eta \lambda}{n} w \label{eq:91}\tag{91}\\ & = \left(1-\frac{\eta \lambda}{n}\right) w -\eta \frac{\partial C_0}{\partial w} \label{eq:92}\tag{92} \end{align} $1-\frac{\eta\lambda}{n}$ \gls*{weight} $w$\textbf{\gls*{weight}}\gls*{weight} \gls*{weight} $0$\gls*{cost-func} \gls*{weight} \gls*{sgd}\gls*{regularization} $m$ \gls*{mini-batch} $\partial C_0/\partial w$\gls*{sgd}\gls*{regularization}~\eqref{eq:20} \begin{equation} w \rightarrow \left(1-\frac{\eta \lambda}{n}\right) w -\frac{\eta}{m} \sum_x \frac{\partial C_x}{\partial w} \label{eq:93}\tag{93} \end{equation} \gls*{mini-batch} $x$ $C_x$ \gls*{regularization}% \gls*{sgd}\gls*{weight} $1-\frac{\eta \lambda}{n}$\gls*{bias}\gls*{regularization} \gls*{regularization}~\eqref{eq:21} \begin{equation} b \rightarrow b - \frac{\eta}{m} \sum_x \frac{\partial C_x}{\partial b} \label{eq:94}\tag{94} \end{equation} \gls*{mini-batch} $x$ \gls*{regularization} $30$ \gls*{mini-batch} $10$\gls*{learning-rate} $0.5$\gls*{regularization}% $\lambda = 0.1$ \lstinline!lmbda! Python \lstinline!lambda! \lstinline!test_data! \lstinline!validation_data! \lstinline!validation_data! \gls*{regularization} \lstinline!validation_data! \begin{lstlisting}[language=Python] >>> import mnist_loader >>> training_data, validation_data, test_data = \ ... mnist_loader.load_data_wrapper() >>> import network2 >>> net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost) >>> net.large_weight_initializer() >>> net.SGD(training_data[:1000], 400, 10, 0.5, ... evaluation_data=test_data, lmbda = 0.1, ... monitor_evaluation_cost=True, monitor_evaluation_accuracy=True, ... monitor_training_cost=True, monitor_training_accuracy=True) \end{lstlisting} \gls*{cost-func}\gls*{regularization}\footnote{ \href{path_to_url}{overfitting.py} } \begin{center} \includegraphics[width=.6\textwidth]{regularized1} \end{center} 400 \gls*{epoch} \begin{center} \includegraphics[width=.6\textwidth]{regularized2} \end{center} \gls*{regularization}\gls*{overfitting} 87.1\% 82.27\% 400 \gls*{epoch} \gls*{regularization} \gls*{overfitting} 1,000 50,000 \gls*{overfitting}% \gls*{regularization}30 \gls*{epoch}, \gls*{learning-rate} 0.5, \gls*{mini-batch} 10\gls*{regularization} $n=1,000$ $n=50,000$\gls*{weight} $1-\frac{\eta\lambda}{n}$ $\lambda = 0.1$ \gls*{weight} \gls*{regularization} $\lambda = 5.0$ \gls*{weight} \begin{lstlisting}[language=Python] >>> net.large_weight_initializer() >>> net.SGD(training_data, 30, 10, 0.5, ... evaluation_data=test_data, lmbda = 5.0, ... monitor_evaluation_accuracy=True, monitor_training_accuracy=True) \end{lstlisting} \begin{center} \includegraphics[width=.6\textwidth]{code_samples/fig/regularized_full} \end{center} \gls*{regularization} 95.49\% 96.49\% \gls*{overfitting} 100 \gls*{regularization} $\lambda = 5.0$ L2 \gls*{regularization} \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 100, 10], cost=network2.CrossEntropyCost) >>> net.large_weight_initializer() >>> net.SGD(training_data, 30, 10, 0.5, lmbda=5.0, ... evaluation_data=validation_data, ... monitor_evaluation_accuracy=True) \end{lstlisting} 97.92\% 30 \label{chap3_98_04_percent}60 \gls*{epoch} $\eta=0.1$ $\lambda = 5.0$ 98\%98.04\% \label{98percent} 152 \gls*{regularization}\gls*{overfitting} \gls*{weight} MNIST \gls*{regularization}\gls*{cost-func} \gls*{regularization} \gls*{cost-func}\gls*{regularization}\gls*{weight} \gls*{weight} \gls*{cost-func} \subsection{} % I produce the 3 graphs in MATLAB: % % for simple_model: % x = [0.976923076923080,1.48461538461538,1.99230769230769,2.58461538461538,2.83846153846154,3.43076923076923,3.60000000000000,3.72692307692308,4.10769230769231,4.53076923076923]; % y = [2.51111111111111,2.82222222222222,4.22222222222222,5,5.85555555555556,6.55555555555556,6.86666666666667,7.33333333333333,8.18888888888889,8.88888888888889]; % plot(x,y,'.k','MarkerSize', 20); % xlabel('\it x','FontSize',16,'FontWeight','bold') % ylabel('\it y','FontSize',16,'FontWeight','bold') % % for polynomial_fit: % p = polyfit(x, y, 9); % x1 = 0.95:0.05:4.55; % y1 = polyval(p, x1); % figure % plot(x,y,'.k','MarkerSize', 20) % hold on % plot(x1,y1,'b') % hold off % % for linear_fit: % x2 = [0, 5]; % y2 = [0, 10]; % figure % plot(x,y,'.k','MarkerSize', 20) % hold on % plot(x2,y2,'b') % hold off \gls*{regularization}\gls*{overfitting} \gls*{weight} \begin{center} \includegraphics[width=.55\textwidth]{simple_model.eps} \end{center} $x$ $y$ $y$ $x$ $9$ $y=a_0x^9 + a_1x^8 + ... + a_9$ \footnote{ Numpy \lstinline!polyfit! % \href{path_to_url}{ } 14 \lstinline!p(x)! } \begin{center} \includegraphics[width=.55\textwidth]{polynomial_fit.eps} \end{center} $y=2x$ \begin{center} \includegraphics[width=.55\textwidth]{linear_fit.eps} \end{center} 19 2 $y=2x$ $x$ $y$ 9 $x^9$ \gls*{weight} \gls*{weight} \gls*{regularization} \gls*{regularization} \gls*{weight}\gls*{regularization}% \gls*{weight} \gls*{regularization} 1940 Marcel Schein GE Hans Bethe Bethe Schein Schein plate Bethe Schein Bethe plateBethe Schein $1/5$ Bethe $5$ plate Schein plateplate plate Bethe Bethe Schein \footnote{ Richard Feynman Charles Weiner % \href{path_to_url}{}% } 1859 Urbain Le Verrier 1916 \gls*{regularization}\gls*{regularization} empirical fact\gls*{regularization}% \gls*{regularization}\gls*{regularization} \gls*{regularization} ~~\gls*{regularization} \footnote{ \href{path_to_url}{problem of induction} David Hume \href{path_to_url}{"An Enquiry Concerning Human Understanding"} 1748 David Wolpert William Macready 1997% \href{path_to_url}{}% } ~~~~ \gls*{regularization} \gls*{regularization} 100 80,000 50,000 80,000 50,000 \gls*{overfitting} \footnote{ \href{path_to_url}{Gradient-Based Learning Applied to Document Recognition} Yann LeCun Lon Bottou Yoshua Bengio Patrick Haffner 1998}\gls*{regularization} \gls*{regularization} L2 \gls*{regularization}\gls*{bias} \gls*{regularization}\gls*{bias} \gls*{bias}\gls*{regularization} \gls*{bias}\gls*{weight} \gls*{bias}\gls*{bias} ~~\gls*{bias} \gls*{bias}\gls*{regularization} \subsection{} L2 \gls*{regularization} \gls*{overfitting}L1 \gls*{regularization}\gls*{dropout} \gls*{regularization}\\ \textbf{L1 \gls*{regularization}} \gls*{regularization}\gls*{cost-func} \begin{equation} C = C_0 + \frac{\lambda}{n} \sum_w |w| \label{eq:95}\tag{95} \end{equation} L2 \gls*{regularization}\gls*{weight}\gls*{weight} L1 \gls*{regularization} L2 \gls*{regularization} L1 \gls*{regularization} L1 \gls*{regularization} L2 \gls*{regularization} \gls*{cost-func} \eqref{eq:95} \begin{equation} \frac{\partial C}{\partial w} = \frac{\partial C_0}{\partial w} + \frac{\lambda}{n} \, {\rm sgn}(w) \label{eq:96}\tag{96} \end{equation} ${\rm sgn}(w)$ $w$ $w$ $+1$ $w$ $-1$\gls*{bp} L1 \gls*{regularization} L1 \gls*{regularization} \begin{equation} w \rightarrow w' = w-\frac{\eta \lambda}{n} \mbox{sgn}(w) - \eta \frac{\partial C_0}{\partial w} \label{eq:97}\tag{97} \end{equation} \gls*{mini-batch} $\partial C_0/\partial w$ L2 \gls*{regularization}~\eqref{eq:93} \begin{equation} w \rightarrow w' = w\left(1 - \frac{\eta \lambda}{n} \right) - \eta \frac{\partial C_0}{\partial w} \label{eq:98}\tag{98} \end{equation} \gls*{regularization}\gls*{weight}\gls*{regularization} \gls*{weight} L1 \gls*{regularization}\gls*{weight} $0$ L2 \gls*{regularization}\gls*{weight} $w$ \gls*{weight} $|w|$ L1 \gls*{regularization}\gls*{weight} L2 \gls*{regularization} $|w|$ L1 \gls*{regularization}\gls*{weight} L2 \gls*{regularization} L1 \gls*{regularization}\gls*{weight}\gls*{weight} $0$ ~~ $w=0$ $\partial C/\partial w$ $|w|$ $w=0$ \gls*{regularization}\gls*{sgd} $w=0$ \gls*{regularization}\gls*{weight} $0$ \gls*{weight} ~\eqref{eq:96} ~\eqref{eq:97} $\mbox{sgn}(0) = 0$ L1 \gls*{regularization}\gls*{sgd}\\ \textbf{\gls{dropout}} \gls*{dropout} L1L2 \gls*{regularization}\gls*{dropout}\gls*{cost-func}\gls*{dropout} \gls*{dropout} \begin{center} \includegraphics{tikz30} \end{center} $x$ $y$ $x$ \gls*{bp}\gls*{dropout} \gls*{dropout} \begin{center} \includegraphics{tikz31} \end{center} $x$\gls*{bp} \gls*{mini-batch}\gls*{weight}\gls*{bias} \gls*{dropout} \gls*{mini-batch}\gls*{weight}\gls*{bias} \gls*{weight}\gls*{bias}\gls*{weight}\gls*{bias} \gls*{dropout} \gls*{weight} \gls*{dropout}\gls*{regularization}% \gls*{dropout} 33 \gls*{overfitting} \gls*{overfitting}\gls*{overfitting} \gls*{dropout}\gls*{dropout} \gls*{dropout} \gls*{overfitting}\gls*{dropout}\gls*{overfitting} \label{dropout_explanation} \footnote{\href{path_to_url}{ImageNet Classification with Deep Convolutional Neural Networks} Alex Krizhevsky Ilya Sutskever Geoffrey Hinton 2012} \gls*{dropout} \gls*{dropout} L1L2 \gls*{regularization}\gls*{weight} \gls*{dropout} \footnote{\href{path_to_url}{Improving neural networks by preventing co-adaptation of feature detectors} Geoffrey Hinton Nitish Srivastava Alex Krizhevsky Ilya Sutskever Ruslan Salakhutdinov 2012 } \gls*{dropout} MNIST 98.4\% \gls*{dropout} L2 \gls*{regularization} 98.7\% \gls*{dropout} \\ \textbf{} MNIST 1,000 80\% 30 \gls*{mini-batch} $10$% \gls*{learning-rate} $\eta=0.5$\gls*{regularization} $\lambda=5.0$\gls*{cost-func} 30 \gls*{epoch} \gls*{epoch}\gls*{weight} \gls*{regularization} $\lambda = 5.0$ $\lambda$ \footnote{ \href{path_to_url}{\lstinline!more_data.py!} } \begin{center} \includegraphics[width=.6\textwidth]{more_data} \end{center} \begin{center} \includegraphics[width=.6\textwidth]{more_data_log} \end{center} ~~ 50,000~~ 5 MNIST \begin{center} \includegraphics[height=32pt]{more_data_5} \end{center} $15^{\circ}$ \begin{center} \includegraphics[height=32pt]{more_data_rotated_5} \end{center} MNIST \textbf{} MNIST \textbf{} \footnote{\href{path_to_url}{Best Practices for Convolutional Neural Networks Applied to Visual Document Analysis} Patrice Simard Dave Steinkraus John Platt 2003} MNIST ~~ 800 MNIST 98.4\% 98.9\% 99.3\% ~~ \subsection*{} \begin{itemize} \item MNIST \end{itemize} \textbf{} \begin{center} \includegraphics[width=.6\textwidth]{more_data_log} \end{center} SVM% \hyperref[ch:UsingNeuralNetsToRecognizeHandwrittenDigits]{} SVM \href{path_to_url}{scikit-learn } SVM SVM \footnote{ \href{path_to_url}{\lstinline!more_data.py!} } \begin{center} \includegraphics[width=.6\textwidth]{more_data_comparison} \end{center} SVM scikit-learn SVM 50,000 94.48\% 5,000 93.24\% A B A B B~~~~ \footnote{ \href{path_to_url}{Scaling to very very large corpora for natural language disambiguation} Michele Banko Eric Brill 2001} A B Y X \textbf{} \subsection*{} \begin{itemize} \item \textbf{} \end{itemize} \textbf{} \gls*{overfitting}\gls*{regularization} \gls*{overfitting} \gls*{regularization} \section{} \label{sec:weight_initialization} \gls*{weight}\gls*{bias}% \hyperref[ch:UsingNeuralNetsToRecognizeHandwrittenDigits]{} \gls*{weight}\gls*{bias} $0$ $1$\textbf{} \gls*{weight}\gls*{bias} $1,000$ \gls*{weight}\gls*{weight} \begin{center} \includegraphics{tikz32} \end{center} $x$ $1$ $0$ $z=\sum_j w_j x_j + b$ $500$ $x_j$ $0$ $z$ $501$ $500$ \gls*{weight} $1$ \gls*{bias} $z$ $0$ $\sqrt{501} \approx 22.4$$z$ \begin{center} \includegraphics{wide_gaussian} \end{center} $|z|$ $z \gg 1$ $z \ll -1$ $\sigma(z)$ $1$ $0$ \gls*{weight} \gls*{cost-func}\gls*{weight} \footnote{% \hyperref[sec:the_four_fundamental_equations_behind_backpropagation]{\gls*{bp} }\gls*{weight}} \gls*{cost-func} \gls*{weight} \gls*{weight} $0$ $1$ $n_{\rm in}$ \gls*{weight} $0$ $1/\sqrt{n_{\rm in}}$ \gls*{weight} $0$ $1$ \gls*{bias} $z = \sum_j w_j x_j + b$ $0$ $500$ $0$ $500$ $1$ $z$ $0$ $\sqrt{3/2} = 1.22\ldots$ \begin{center} \includegraphics{narrow_gaussian} \end{center} \subsection*{} \begin{itemize} \item $z = \sum_j w_j x_j + b$ $\sqrt{3/2}$ ab \end{itemize} \gls*{bias} $0$ $1$ \gls*{bias} \gls*{bias} \gls*{bias} $0$\gls*{bias} MNIST \gls*{weight} $30$ \gls*{mini-batch} $10$\gls*{regularization} $\lambda = 5.0$ \gls*{learning-rate} $\eta=0.5$ $0.1$ \gls*{weight} \begin{lstlisting}[language=Python] `python >>> import mnist_loader >>> training_data, validation_data, test_data = \ ... mnist_loader.load_data_wrapper() >>> import network2 >>> net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost) >>> net.large_weight_initializer() >>> net.SGD(training_data, 30, 10, 0.1, lmbda = 5.0, ... evaluation_data=validation_data, ... monitor_evaluation_accuracy=True) \end{lstlisting} \gls*{weight} \lstinline!network2! \lstinline!net.large_weight_initializer()! \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost) >>> net.SGD(training_data, 30, 10, 0.1, lmbda = 5.0, ... evaluation_data=validation_data, ... monitor_evaluation_accuracy=True) \end{lstlisting} \footnote{ \href{path_to_url}{\lstinline!weight_initialization.py!} } \begin{center} \includegraphics[width=.6\textwidth]{weight_initialization_30} \end{center} 96\% 87\% 93\%\gls*{weight} $100$ \begin{center} \includegraphics[width=.6\textwidth]{weight_initialization_100} \end{center} % \gls*{epoch} \gls*{weight} $1/\sqrt{n_{\rm in}}$ \gls*{weight} $1/\sqrt{n_{\rm in}}$ \gls*{weight} $1/\sqrt{n_{\rm in}}$ 2012 Yoshua Bengio \footnote{\href{path_to_url}{Practical Recommendations for Gradient-Based Training of Deep Architectures} Yoshua Bengio 2012} 14 15 \subsection*{} \begin{itemize} \item \textbf{\gls*{regularization}\gls*{weight}} L2 \gls*{regularization} \gls*{weight} 1 $\lambda$ \gls*{epoch}\gls*{weight} 2 $\eta \lambda \ll n$\gls*{weight} $\exp(-\eta \lambda / m)$ \gls*{epoch}3 $\lambda$ \gls*{weight}\gls*{weight} $1/\sqrt{n}$ $n$ \gls*{weight} \end{itemize} \section{} \label{sec:handwriting_recognition_revisited_the_code} \lstinline!network2.py! \hyperref[sec:implementing_our_network_to_classify_digits]{} \lstinline!network.py! \lstinline!network.py! $74$ \lstinline!network.py! \lstinline!Network! \lstinline!sizes! \lstinline!cost! \begin{lstlisting}[language=Python] class Network(object): def __init__(self, sizes, cost=CrossEntropyCost): self.num_layers = len(sizes) self.sizes = sizes self.default_weight_initializer() self.cost=cost \end{lstlisting} \lstinline!__init__! \lstinline!network.py! \lstinline!default_weight_initializer! % \hyperref[sec:weight_initialization]{\gls*{weight}} $0$ $1/\sqrt{n}$$n$ $0$ $1$ \gls*{bias} \begin{lstlisting}[language=Python] def default_weight_initializer(self): self.biases = [np.random.randn(y, 1) for y in self.sizes[1:]] self.weights = [np.random.randn(y, x)/np.sqrt(x) for x, y in zip(self.sizes[:-1], self.sizes[1:])] \end{lstlisting} \lstinline!np! Numpy \lstinline!import! Numpy\gls*{bias} \gls*{bias} \lstinline!network.py! \lstinline!default_weight_initializer! \lstinline!large_weight_initializer! \gls*{weight}\gls*{bias} \lstinline!default_weight_initializer! \begin{lstlisting}[language=Python] def large_weight_initializer(self): self.biases = [np.random.randn(y, 1) for y in self.sizes[1:]] self.weights = [np.random.randn(y, x) for x, y in zip(self.sizes[:-1], self.sizes[1:])] \end{lstlisting} \lstinline!larger_weight_initializer! \lstinline!__init__! \lstinline!cost! \footnote{ Python \lstinline!@staticmethod! \lstinline!fn! \lstinline!delta! \lstinline!@staticmethod! Python \lstinline!self! \lstinline!fn! \lstinline!delta!} \begin{lstlisting}[language=Python] class CrossEntropyCost(object): @staticmethod def fn(a, y): return np.sum(np.nan_to_num(-y*np.log(a)-(1-y)*np.log(1-a))) @staticmethod def delta(z, a, y): return (a-y) \end{lstlisting} Python Python \gls*{cost-func} $a$ $y$ \lstinline!CrossEntropyCost.fn! \lstinline!np.nan_to_num! Numpy $0$ \gls*{cost-func}% \hyperref[sec:the_four_fundamental_equations_behind_backpropagation]{} \gls*{bp}$\delta^L$ \gls*{cost-func}\gls*{cost-func} ~\eqref{eq:66} \begin{equation} \delta^L = a^L-y \label{eq:99}\tag{99} \end{equation} \lstinline!CrossEntropyCost.delta! \lstinline!network2.py! \gls*{cost-func} \lstinline!QuadraticCost.fn! $a$ $y$ \lstinline!QuadraticCost.delta! \gls*{cost-func} ~\eqref{eq:30} \begin{lstlisting}[language=Python] class QuadraticCost(object): @staticmethod def fn(a, y): return 0.5*np.linalg.norm(a-y)**2 @staticmethod def delta(z, a, y): return (a-y) * sigmoid_prime(z) \end{lstlisting} \lstinline!network2.py! \lstinline!network.py! L2 \gls*{regularization}% \gls*{regularization} \lstinline!network2.py! \lstinputlisting[language=Python]{code_samples/src/network2.py} L2 \gls*{regularization} \lstinline!lmbda! \lstinline!Network.SGD! \lstinline!Network.update_mini_batch! \gls*{weight} \gls*{regularization} \gls*{sgd} \lstinline!False! \lstinline!True! \lstinline!Network! \lstinline!network2.py! \lstinline!Network.SGD! \begin{lstlisting}[language=Python] >>> evaluation_cost, evaluation_accuracy, ... training_cost, training_accuracy = net.SGD(training_data, 30, 10, 0.5, ... lmbda = 5.0, ... evaluation_data=validation_data, ... monitor_evaluation_accuracy=True, ... monitor_evaluation_cost=True, ... monitor_training_accuracy=True, ... monitor_training_cost=True) \end{lstlisting} \lstinline!evaluation_cost! $30$ \gls*{epoch}\gls*{cost-func} \lstinline!Network.save! \lstinline!Network! JSON Python \lstinline!pickle! \lstinline!cPickle! ~~ Python JSON \lstinline!Network! sigmoid \lstinline!Network.__init__! pickle \lstinline!load! JSON Network \lstinline!load! \lstinline!network.py! $74$ $152$ \subsection*{} \begin{itemize} \item L1 \gls*{regularization} L1 \gls*{regularization} $30$ MNIST \gls*{regularization}\gls*{regularization} \item \href{path_to_url}{\lstinline!network.py!} \lstinline!Network.cost_derivative! \gls*{cost-func}\gls*{cost-func} \lstinline!network2.py! \lstinline!Network.cost_derivative! `CrossEntropyCost.delta` \end{itemize} \section{} \label{sec:how_to_choose_a_neural_network's_hyper-parameters} \gls*{learning-rate} $\eta$\gls*{regularization} $\lambda$ MNIST \gls*{learning-rate} $\eta=10.0$ \gls*{regularization} $\lambda=1000.0$ \begin{lstlisting}[language=Python] >>> import mnist_loader >>> training_data, validation_data, test_data = \ ... mnist_loader.load_data_wrapper() >>> import network2 >>> net = network2.Network([784, 30, 10]) >>> net.SGD(training_data, 30, 10, 10.0, lmbda = 1000.0, ... evaluation_data=validation_data, monitor_evaluation_accuracy=True) Epoch 0 training complete Accuracy on evaluation data: 1030 / 10000 Epoch 1 training complete Accuracy on evaluation data: 990 / 10000 Epoch 2 training complete Accuracy on evaluation data: 1009 / 10000 ... Epoch 27 training complete Accuracy on evaluation data: 1009 / 10000 Epoch 28 training complete Accuracy on evaluation data: 983 / 10000 Epoch 29 training complete Accuracy on evaluation data: 967 / 10000 \end{lstlisting} \gls*{learning-rate}\gls*{regularization} $30$ $100$ $300$ minibatch \gls*{cost-func}\gls*{weight} \\ \textbf{} \textbf{} MNIST $0$ $1$ $0$ $1$ $10$ 80\% $5$ $[784, 10]$ $[784, 30 ,10]$ \lstinline!network2.py! $50,000$ ~~ $[784, 30, 10]$ $10$ $10$ $1,000$ $10,000$ $100$ \lstinline!network2.py! $1,000$ MNIST 0 1 \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 10]) >>> net.SGD(training_data[:1000], 30, 10, 10.0, lmbda = 1000.0, \ ... evaluation_data=validation_data[:100], \ ... monitor_evaluation_accuracy=True) Epoch 0 training complete Accuracy on evaluation data: 10 / 100 Epoch 1 training complete Accuracy on evaluation data: 10 / 100 Epoch 2 training complete Accuracy on evaluation data: 10 / 100 ... \end{lstlisting} 10 $\lambda=1000.0$ $\lambda$ \gls*{weight} $\lambda = 20.0$ \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 10]) >>> net.SGD(training_data[:1000], 30, 10, 10.0, lmbda = 20.0, \ ... evaluation_data=validation_data[:100], \ ... monitor_evaluation_accuracy=True) Epoch 0 training complete Accuracy on evaluation data: 12 / 100 Epoch 1 training complete Accuracy on evaluation data: 14 / 100 Epoch 2 training complete Accuracy on evaluation data: 25 / 100 Epoch 3 training complete Accuracy on evaluation data: 18 / 100 ... \end{lstlisting} \gls*{learning-rate} $\eta$ $100.0$: \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 10]) >>> net.SGD(training_data[:1000], 30, 10, 100.0, lmbda = 20.0, \ ... evaluation_data=validation_data[:100], \ ... monitor_evaluation_accuracy=True) Epoch 0 training complete Accuracy on evaluation data: 10 / 100 Epoch 1 training complete Accuracy on evaluation data: 10 / 100 Epoch 2 training complete Accuracy on evaluation data: 10 / 100 Epoch 3 training complete Accuracy on evaluation data: 10 / 100 ... \end{lstlisting} \gls*{learning-rate} $\eta$ $\eta=1.0$ \begin{lstlisting}[language=Python] >>> net = network2.Network([784, 10]) >>> net.SGD(training_data[:1000], 30, 10, 1.0, lmbda = 20.0, \ ... evaluation_data=validation_data[:100], \ ... monitor_evaluation_accuracy=True) Epoch 0 training complete Accuracy on evaluation data: 62 / 100 Epoch 1 training complete Accuracy on evaluation data: 42 / 100 Epoch 2 training complete Accuracy on evaluation data: 43 / 100 Epoch 3 training complete Accuracy on evaluation data: 61 / 100 ... \end{lstlisting} $\eta$ $10$ $\eta$ $\lambda$ $20$ hold out ~~ $\eta$L2 \gls*{regularization} $\lambda$\gls*{mini-batch} \gls*{regularization} momentum co-efficient \\ \textbf{\gls*{learning-rate}} \gls*{learning-rate}$\eta=0.025$ $\eta=0.25$$\eta=2.5$ MNIST $30$ minibatch $10$ $\lambda = 5.0$ $50,000$ \begin{center} \includegraphics[width=.6\textwidth]{multiple_eta} \end{center} $\eta=0.025$\gls*{cost-func} $\eta=0.25$ $20$ $\eta=2.5$ \gls*{cost-func} \begin{center} \includegraphics{valley_with_ball} \end{center} $\eta$ $\eta=2.5$ $\eta=0.25$ $\eta=0.025$ $30$ % \gls*{learning-rate}~~\gls*{sgd} $\eta=0.25$$\eta=0.025$ \gls*{learning-rate} \gls*{learning-rate}$\eta$ $\eta$ $\eta$ $\eta=0.01$ $\eta=0.1, 1.0,...$ $\eta$ $\eta=0.01$ $\eta=0.001, 0.0001,...$ \gls*{learning-rate} $\eta$ $\eta=0.5$ $\eta=0.2$ $\eta$ $\eta$ MNIST \gls*{learning-rate} $\eta$ $0.1$ $\eta=0.5$ \gls*{learning-rate} $\eta=0.25$ $\eta=0.5$ $30$ \gls*{learning-rate} \gls*{cost-func} $\eta$ \gls*{regularization} minibatch \gls*{learning-rate} \gls*{learning-rate}\gls*{learning-rate}% \\ \textbf{\label{early_stopping}\gls*{epoch}} \gls*{overfitting} \gls*{regularization} MNIST $10$ $10$ MNIST ~~ $10$ $20$ $50$ MNIST $10$ MNIST \lstinline!network2.py! \subsection*{} \begin{itemize} \item \lstinline!network2.py! $n$ $n$ \item $n$ \lstinline!network2.py! $10$ \end{itemize} \textbf{\gls*{learning-rate}} \gls*{learning-rate} \gls*{learning-rate}\gls*{weight} \gls*{learning-rate}\gls*{weight} \gls*{learning-rate} \gls*{learning-rate} \gls*{learning-rate} \gls*{learning-rate}$10$ $2$% \gls*{learning-rate} $1/1024$$1/1000$ \gls*{learning-rate} ~~ \gls*{learning-rate} \subsection*{} \begin{itemize} \item \lstinline!network2.py! $10$ \gls*{learning-rate}\gls*{learning-rate} $1/128$ \end{itemize} \textbf{\gls*{regularization}} \gls*{regularization}$\lambda=0.0$ $\eta$ $\eta$ $\lambda$ $\lambda=1.0$ $10$ $\lambda$ $\eta$ \subsection*{} \begin{itemize} \item $\lambda$ $\eta$ \end{itemize} \textbf{} $\eta$ $\lambda$ \gls*{cost-func}\gls*{cost-func}\gls*{weight} \gls*{regularization} \\ \label{mini_batch_size} \textbf{\gls*{mini-batch}} \gls*{mini-batch} $1$ % \gls*{mini-batch} \gls*{mini-batch} \gls*{cost-func} $10-20$ % \hyperref[ch:]{} \gls*{mini-batch} $50$ $100$ $100$ \gls*{mini-batch}; \begin{equation} w \rightarrow w' = w-\eta \frac{1}{100} \sum_x \nabla C_x \label{eq:100}\tag{100} \end{equation} \gls*{mini-batch} \begin{equation} w \rightarrow w' = w-\eta \nabla C_x \label{eq:101}\tag{101} \end{equation} $50$ \gls*{mini-batch}\gls*{learning-rate} $100$ \begin{equation} w \rightarrow w' = w-\eta \sum_x \nabla C_x \label{eq:102}\tag{102} \end{equation} $100$ $50$ 100 \gls*{mini-batch} $\nabla C_x$ \gls*{weight}% \gls*{mini-batch} \gls*{mini-batch} \gls*{weight} \gls*{mini-batch} % \gls*{mini-batch} \gls*{mini-batch} $\eta$ \gls*{mini-batch}\gls*{mini-batch} % \gls*{mini-batch}\gls*{mini-batch} $10$ \gls*{mini-batch} \gls*{mini-batch}$1$ \gls*{mini-batch} \gls*{mini-batch}\\ \textbf{} \textbf{}\textbf{grid search} James Bergstra Yoshua Bengio $2012$ \footnote{\href{path_to_url}{Random search for hyper-parameter optimization} James Bergstra Yoshua Bengio 2012} 2012 \footnote{\href{path_to_url}{Practical Bayesian optimization of machine learning algorithms} Jasper Snoek Hugo Larochelle Ryan Adams}% \href{path_to_url}{} \\ \textbf{} $\eta$ $\lambda$ $\eta$ , , Yoshua Bengio 2012 \footnote{\href{path_to_url}{Practical recommendations for gradient-based training of deep architectures} Yoshua Bengio 2012}\gls*{bp} Bengio 1998 Yann LeCunLon BottouGenevieve Orr Klaus-Robert Mller \footnote{\href{path_to_url}{Efficient BackProp} Yann LeCun Lon Bottou Genevieve Orr Klaus-Robert Mller 1998} 2012 \footnote{\href{path_to_url}{Neural Networks: Tricks of the Trade} Grgoire Montavon Genevive Orr Klaus-Robert Mller } SVM \section{} \label{sec:other_techniques} \subsection{} \gls*{bp}\gls*{sgd} MNIST \gls*{cost-func} Hessian momentum \\ \textbf{Hessian } \gls*{cost-func} $C$ $C$ $w=w_1,w_2,\ldots$ $C=C(w)$\gls*{cost-func} $w$ \begin{align} C(w+\Delta w) &= C(w) + \sum_j \frac{\partial C}{\partial w_j} \Delta w_j \nonumber \\ & \quad + \frac{1}{2} \sum_{jk} \Delta w_j \frac{\partial^2 C}{\partial w_j \partial w_k} \Delta w_k + \ldots \label{eq:103}\tag{103} \end{align} \begin{equation} C(w+\Delta w) = C(w) + \nabla C \cdot \Delta w + \frac{1}{2} \Delta w^T H \Delta w + \ldots \label{eq:104}\tag{104} \end{equation} $\nabla C$ $H$ \textbf{Hessian } $jk$ $\partial^2 C/\partial w_j\partial w_k$ $C$ \begin{equation} C(w+\Delta w) \approx C(w) + \nabla C \cdot \Delta w + \frac{1}{2} \Delta w^T H \Delta w \label{eq:105}\tag{105} \end{equation} \footnote{ Hessian $C$ } \begin{equation} \Delta w = -H^{-1} \nabla C \label{eq:106}\tag{106} \end{equation} ~\eqref{eq:105} \gls*{cost-func} $w$ $w+\Delta w = w - H^{-1}\nabla C$ \gls*{cost-func} \gls*{cost-func} \begin{itemize} \item $w$ \item $w$ $w' = w - H_{-1}\nabla C$ Hessian $H$ $\nabla C$ $w$ \item $w'$ $w = w' - H'^{-1}\nabla' C$ Hessian $H'$ $\nabla' C$ $w'$ \item $\ldots$ \end{itemize} \eqref{eq:105} $\Delta w = -\eta H^{-1} \nabla C$ $w$ $\eta$ \gls*{learning-rate} \gls*{cost-func} \textbf{Hessian } \textbf{Hessian } Hessian \gls*{cost-func} Hessian pathologies\gls*{bp} Hessian Hessian Hessian Hessian $10^7$ \gls*{weight}\gls*{bias} Hessian $10^7 \times 10^7=10^{14}$ $H^{-1}\nabla C$ Hessian momentum \\ \textbf{ momentum } Hessian momentum momentum momentum velocity momentum $v = v_1, v_2, \ldots$ $w_j$ \footnote{$w_j$ \gls*{weight} } $w\rightarrow w'=w-\eta\nabla C$ \begin{align} v \rightarrow v' &= \mu v - \eta \nabla C \label{eq:107}\tag{107}\\ w \rightarrow w' &= w+v' \label{eq:108}\tag{108} \end{align} $\mu$ $\mu=1$ $\nabla C$ $v$ $w$ \begin{center} \includegraphics{valley_with_ball} \end{center} momentum ~\eqref{eq:107} $\mu$ $\mu$ $1-\mu$ $\mu=1$ $\nabla C$ $\mu=0$ ~\eqref{eq:107}~\eqref{eq:108} $w\rightarrow w'=w-\eta \nabla C$ $0$ $1$ $\mu$ hold out $\mu$ $\eta$ $\lambda$ $\mu$ $\mu$ \textbf{moment co-efficient} $\mu$ momentum momentum \gls*{bp} minibatch Hessian ~~ momentum \subsection*{} \begin{itemize} \item $\mu > 1$ \item $\mu < 0$ \end{itemize} \subsection*{} \begin{itemize} \item momentum \gls*{sgd} \lstinline!network2.py! \end{itemize} \textbf{\gls*{cost-func}} \gls*{cost-func} \footnote{\href{path_to_url}{Efficient BackProp} Yann LeCun Lon Bottou Genevieve Orr and Klaus-Robert Mller 1998} BFGS limited memory BFGS \href{path_to_url}{L-BFGS} \footnote{ \href{path_to_url~hinton/absps/momentum.pdf}{On the importance of initialization and momentum in deep learning} Ilya Sutskever James Martens George Dahl Geoffrey Hinton 2012} Nesterov momentum \gls*{sgd} momentum \subsection{} \label{subsec:other_models_of_artificial_neuron} \gls*{sigmoid-neuron} S \gls{tanh-neuron}\gls{hyperbolic-tangent} \gls*{sigmoid-func} $x$ $w$\gls*{bias} $b$ \gls*{tanh-neuron} \begin{equation} \tanh(w \cdot x+b) \label{eq:109}\tag{109} \end{equation} \gls*{sigmoid-neuron} $\tanh$ \begin{equation} \tanh(z) \equiv \frac{e^z-e^{-z}}{e^z+e^{-z}} \label{eq:110}\tag{110} \end{equation} \begin{equation} \sigma(z) = \frac{1+\tanh(z/2)}{2} \label{eq:111}\tag{111} \end{equation} $\tanh$ \gls*{sigmoid-func} $\tanh$ \begin{center} \includegraphics{tanh_function} \end{center} $\tanh$ $(-1, 1)$ $(0, 1)$ $\tanh$ sigmoid \gls*{sigmoid-neuron}\gls*{tanh-neuron} $(-1, 1)$ \footnote{ tanh \gls*{sigmoid-neuron} }\gls*{bp}\gls*{sgd} \gls*{tanh-neuron} \subsection*{} \begin{itemize} \item ~\eqref{eq:111} \end{itemize} \gls*{tanh} S \gls*{tanh}\footnote{ \href{path_to_url}{Efficient BackProp} Yann LeCun Lon Bottou Genevieve Orr Klaus-Robert Mller 1998 \href{path_to_url}{Understanding the difficulty of training deep feedforward networks} Xavier Glorot Yoshua Bengio 2010}\gls*{tanh} \gls*{sigmoid-neuron}\gls*{weight} $w_{jk}^{l+1}$ $l+1$ $j$ \gls*{bp}% \hyperref[eq:bp4]{} $a_k^l\delta_j^{l+1}$ $\delta_j^{l+1}$ $\delta_j^{l+1}$ $w_{jk}^{l+1}$ $\delta_j^{l+1}$ \gls*{weight} $w_{jk}^{l+1}$ \gls*{weight} \gls*{weight} \gls*{tanh} \gls*{tanh} $0$ $\tanh(-z) = -\tanh(z)$ \gls*{weight} \gls*{bias} \gls*{tanh} \gls*{sigmoid-func} \gls*{sigmoid-neuron} \gls*{tanh} \textbf{\gls{reln}}\textbf{\gls{relu}} ReLU $x$\gls*{weight} $w$\gls*{bias} $b$ ReLU \begin{equation} \max(0, w \cdot x+b) \label{eq:112}\tag{112} \end{equation} $\max(0,z)$ \begin{center} \includegraphics{max_function} \end{center} sigmoid tanh ReLU \gls*{bp}\gls*{sgd} ReLU \footnote{ \href{path_to_url}{What is the Best Multi-Stage Architecture for Object Recognition?} Kevin Jarrett Koray Kavukcuoglu Marc'Aurelio Ranzato Yann LeCun 2009 \href{path_to_url}{Deep Sparse Rectier Neural Networks} Xavier GlorotAntoine Bordes Yoshua Bengio 2011 \href{path_to_url}{ImageNet Classification with Deep Convolutional Neural Networks} Alex Krizhevsky Ilya Sutskever Geoffrey Hinton 2012 \gls*{cost-func}\gls*{regularization} \href{path_to_url~hinton/absps/reluICML.pdf}{Rectified Linear Units Improve Restricted Boltzmann Machines} Vinod Nair Geoffrey Hinton 2010} ReLU \gls*{tanh-neuron} ReLU sigmoid $0$ $1$ $\sigma'$ Tanh ReLU ReLU \gls*{sigmoid-neuron} \subsection{} \begin{quote} {\itshape \textbf{} } \textbf{} -- {\itshape Yann LeCun % \href{path_to_url}{ }} \end{quote} ... ... ...... ~~~~ ~~ ~~ \hyperref[dropout_explanation]{}\gls*{dropout} \footnote{ \href{path_to_url}{ImageNet Classification with Deep Convolutional Neural Networks} Alex KrizhevskyIlya Sutskever Geoffrey Hinton 2012} dropout dropout ~~~~ ```
/content/code_sandbox/chap3.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
20,037
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \crossEntropyCostLearning{2.0}{2.0}{0.005}{100} \end{document} ```
/content/code_sandbox/images/saturation4-100.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage[default]{cjkfonts} \usetikzlibrary{calc,positioning} \input{../westernfonts} \begin{document} \begin{tikzpicture} \foreach \x in {0,...,26} \draw (\x * 0.4,0) -- (\x * 0.4, 1); \coordinate (layer1bottom) at (5.2,1); \coordinate (layer2top) at (5.2,0); \node(layer1) [above,rectangle,draw,minimum width=11cm,inner sep=6pt] at (layer1bottom) { \texttt{AND}, \texttt{OR}, \texttt{NOT} }; \node(layer2) [below,rectangle,draw,minimum width=11cm,inner sep=6pt] at (layer2top) { }; \node(input) [above=of layer1] { \begin{tabular}{c} \\ \end{tabular} }; \node(output) [below=of layer2] { \begin{tabular}{c} \\ \end{tabular} }; \coordinate (t0) at (layer1.north); \coordinate (t1) at (layer1.north east); \coordinate (t2) at (layer1.north west); \coordinate (i0) at (input.south); \coordinate (i1) at (input.south east); \coordinate (i2) at (input.south west); \draw (i0) to (t0); \foreach \x in {0.15,0.35,0.6,0.95} \draw ($ (i0)!\x!(i1) $) to ($ (t0)!\x!(t1) $); \foreach \x in {0.15,0.35,0.6,0.95} \draw ($ (i0)!\x!(i2) $) to ($ (t0)!\x!(t2) $); \coordinate (b0) at (layer2.south); \coordinate (b1) at (layer2.south east); \coordinate (b2) at (layer2.south west); \coordinate (o0) at (output.north); \coordinate (o1) at (output.north east); \coordinate (o2) at (output.north west); \draw (b0) to (o0); \foreach \x in {0.15,0.35,0.6,0.95} \draw ($ (b0)!\x!(b1) $) to ($ (o0)!\x!(o1) $); \foreach \x in {0.15,0.35,0.6,0.95} \draw ($ (b0)!\x!(b2) $) to ($ (o0)!\x!(o2) $); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/shallow_circuit.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
727
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage{pgfplots} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{axis}[ view={-30}{15}, axis background/.style={fill=blue!5}, xlabel=$x$, ylabel=$y$, xtick distance=1, ytick distance=1, ztick distance=1, xtick={1}, ytick={1}, ztick={2}, % big number to disable title={Many towers}, colormap={simple}{rgb255=(235,95,95) rgb255=(255,155,145)}, declare function={ g(\z)=floor(\z * 4.999); f(\x,\y)=(g(\x)*g(\x) + g(\y) * g(\y))/50; }] \addplot3[surf,domain=0:1] { f(x,y) }; \end{axis} \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/many_towers.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
297
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ axis x line=middle, axis y line=left, ymin=-2.2, ymax=2.2, xmax=1.1, xlabel=$x$, xtick distance=1, declare function={ sigma(\z) = 1/(1 + exp(-\z)); f(\x,\h,\s,\e) = \h * (sigma(300 * (\x - \s)) - sigma(300 * (\x - \e))); }] \addplot[red!50,thick,domain=0.08:0.32,samples=51] { f(x, -1.55/2, 0.1, 0.3) }; \addplot[green!50,thick,domain=0.28:0.52,samples=51] { f(x, -1.15/2, 0.3, 0.5) }; \addplot[blue!50,thick,domain=0.48:0.72,samples=51] { f(x, -0.7/2, 0.5, 0.7) }; \addplot[violet!50,thick,domain=0.68:0.92,samples=51] { f(x, -0.6/2, 0.7, 0.9) }; \addplot[orange!50,thick,domain=0.88:0.99,samples=51] { f(x, 0.3, 0.9, 1.1) }; \end{axis} \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/shifted_bumps.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
440
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{calc,positioning} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=8mm}, font=\footnotesize ] \node(l0) [neuron] {}; \node(m0) [neuron,right=1.5 of l0] {}; \node(m1) [neuron,above=0.6 of m0] {}; \node(m2) [neuron,above=0.6 of m1] {}; \node(m3) [neuron,above=0.6 of m2] {}; \node(l2) [neuron,left=1.5 of m3] {}; \node(r0) [neuron,right=1.5 of m0] {}; \node(r2) [neuron,right=1.5 of m3] {}; \coordinate (lc) at ($(l0)!0.5!(l2)$); \node(l1) at (lc) [neuron] {}; \coordinate (rc) at ($(r0)!0.5!(r2)$); \node(r1) at (rc) [neuron] {}; \foreach \x in {0,1,2} \node(tl\x) [left=0.1 of l\x] {$\ldots$}; \foreach \x in {0,1,2} \node(tr\x) [right=0.1 of r\x] {$\ldots$}; \node (n0) [neuron,right=5 of m1] {}; \node (n1) [neuron,right=5 of m2] {}; \coordinate (nc) at ($(n0)!0.5!(n1)$); \node (c) [right=1.5 of nc] {$C$}; \node(tn0) [left=0.1 of n0] {$\ldots$}; \node(tn1) [left=0.1 of n1] {$\ldots$}; % connections: \foreach \x in {0,1,2} \foreach \y in {0,...,3} \draw[->] (l\x) to (m\y); \foreach \x in {0,...,3} \foreach \y in {0,1,2} \draw[->] (m\x) to (r\y); \draw[->] (n0) to (c); \draw[->] (n1) to (c); % mark: \coordinate (p) at ($(l1)!0.5!(m3)$); \draw[->,very thick,blue] (p) to (m3); \draw[->,very thick,blue] (m3) to (r0); \draw[->,very thick,blue] (m3) to (r1); \draw[->,very thick,blue] (m3) to (r2); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz24.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
731
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=1.6mm} ] \foreach \x in {0,...,27} \foreach \y in {0,...,27} \node (x\x y\y) [neuron,gray] at (\x * 0.25,\y * 0.25) {}; \node [above] at (3.5,7) {input neurons}; \foreach \x in {0,...,23} \foreach \y in {0,...,23} \node (m\x n\y) [neuron,gray] at (\x * 0.25 + 9, \y * 0.25 + 0.5) {}; \node [above] at (12, 6.5) {first hidden layer}; \node(hidden) [neuron,orange,thick] at (m0n23) {}; \foreach \x in {0,...,4} \foreach \y in {22,23,...,27} {\node (a\x b\y) [neuron,orange,thick] at (\x * 0.25,\y * 0.25) {}; \draw[->,orange] (a\x b\y) to (hidden); } \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz44.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
365
```postscript %!PS-Adobe-3.0 EPSF-3.0 %%Title: /home/zhanggyb/overfitting3.eps %%Creator: matplotlib version 1.3.1, path_to_url %%CreationDate: Wed Feb 17 11:16:53 2016 %%Orientation: portrait %%BoundingBox: 13 175 598 616 %%EndComments %%BeginProlog /mpldict 8 dict def mpldict begin /m { moveto } bind def /l { lineto } bind def /r { rlineto } bind def /c { curveto } bind def /cl { closepath } bind def /box { m 1 index 0 r 0 exch r neg 0 r cl } bind def /clipbox { box clip newpath } bind def %!PS-Adobe-3.0 Resource-Font %%Title: DejaVu Sans %%Creator: Converted from TrueType to type 3 by PPR 25 dict begin /_d{bind def}bind def /_m{moveto}_d /_l{lineto}_d /_cl{closepath eofill}_d /_c{curveto}_d /_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d /_e{exec}_d /FontName /DejaVuSans def /PaintType 0 def /FontMatrix[.001 0 0 .001 0 0]def /FontBBox[-1021 -415 1681 1167]def /FontType 3 def /Encoding [ /space /period /zero /one /two /three /four /five /six /seven /eight /nine /C /E /a /c /d /e /h /n /o /p /s /t ] def /FontInfo 10 dict dup begin /FamilyName (DejaVu Sans) def /FullName (DejaVu Sans) def /Weight (Book) def /Version (Version 2.34) def /ItalicAngle 0.0 def /isFixedPitch false def /UnderlinePosition -130 def /UnderlineThickness 90 def end readonly def /CharStrings 24 dict dup begin /space{318 0 0 0 0 0 _sc }_d /period{318 0 107 0 210 124 _sc 107 124 _m 210 124 _l 210 0 _l 107 0 _l 107 124 _l _cl}_d /zero{636 0 66 -13 570 742 _sc 318 664 _m 267 664 229 639 203 589 _c 177 539 165 464 165 364 _c 165 264 177 189 203 139 _c 229 89 267 64 318 64 _c 369 64 407 89 433 139 _c 458 189 471 264 471 364 _c 471 464 458 539 433 589 _c 407 639 369 664 318 664 _c 318 742 _m 399 742 461 709 505 645 _c 548 580 570 486 570 364 _c 570 241 548 147 505 83 _c 461 19 399 -13 318 -13 _c 236 -13 173 19 130 83 _c 87 147 66 241 66 364 _c 66 486 87 580 130 645 _c 173 709 236 742 318 742 _c _cl}_d /one{636 0 110 0 544 729 _sc 124 83 _m 285 83 _l 285 639 _l 110 604 _l 110 694 _l 284 729 _l 383 729 _l 383 83 _l 544 83 _l 544 0 _l 124 0 _l 124 83 _l _cl}_d /two{{636 0 73 0 536 742 _sc 192 83 _m 536 83 _l 536 0 _l 73 0 _l 73 83 _l 110 121 161 173 226 239 _c 290 304 331 346 348 365 _c 380 400 402 430 414 455 _c 426 479 433 504 433 528 _c 433 566 419 598 392 622 _c 365 646 330 659 286 659 _c 255 659 222 653 188 643 _c 154 632 117 616 78 594 _c 78 694 _l 118 710 155 722 189 730 _c 223 738 255 742 284 742 _c }_e{359 742 419 723 464 685 _c 509 647 532 597 532 534 _c 532 504 526 475 515 449 _c 504 422 484 390 454 354 _c 446 344 420 317 376 272 _c 332 227 271 164 192 83 _c _cl}_e}_d /three{{636 0 76 -13 556 742 _sc 406 393 _m 453 383 490 362 516 330 _c 542 298 556 258 556 212 _c 556 140 531 84 482 45 _c 432 6 362 -13 271 -13 _c 240 -13 208 -10 176 -4 _c 144 1 110 10 76 22 _c 76 117 _l 103 101 133 89 166 81 _c 198 73 232 69 268 69 _c 330 69 377 81 409 105 _c 441 129 458 165 458 212 _c 458 254 443 288 413 312 _c 383 336 341 349 287 349 _c }_e{202 349 _l 202 430 _l 291 430 _l 339 430 376 439 402 459 _c 428 478 441 506 441 543 _c 441 580 427 609 401 629 _c 374 649 336 659 287 659 _c 260 659 231 656 200 650 _c 169 644 135 635 98 623 _c 98 711 _l 135 721 170 729 203 734 _c 235 739 266 742 296 742 _c 370 742 429 725 473 691 _c 517 657 539 611 539 553 _c 539 513 527 479 504 451 _c 481 423 448 403 406 393 _c _cl}_e}_d /four{636 0 49 0 580 729 _sc 378 643 _m 129 254 _l 378 254 _l 378 643 _l 352 729 _m 476 729 _l 476 254 _l 580 254 _l 580 172 _l 476 172 _l 476 0 _l 378 0 _l 378 172 _l 49 172 _l 49 267 _l 352 729 _l _cl}_d /five{{636 0 77 -13 549 729 _sc 108 729 _m 495 729 _l 495 646 _l 198 646 _l 198 467 _l 212 472 227 476 241 478 _c 255 480 270 482 284 482 _c 365 482 429 459 477 415 _c 525 370 549 310 549 234 _c 549 155 524 94 475 51 _c 426 8 357 -13 269 -13 _c 238 -13 207 -10 175 -6 _c 143 -1 111 6 77 17 _c 77 116 _l 106 100 136 88 168 80 _c 199 72 232 69 267 69 _c }_e{323 69 368 83 401 113 _c 433 143 450 183 450 234 _c 450 284 433 324 401 354 _c 368 384 323 399 267 399 _c 241 399 214 396 188 390 _c 162 384 135 375 108 363 _c 108 729 _l _cl}_e}_d /six{{636 0 70 -13 573 742 _sc 330 404 _m 286 404 251 388 225 358 _c 199 328 186 286 186 234 _c 186 181 199 139 225 109 _c 251 79 286 64 330 64 _c 374 64 409 79 435 109 _c 461 139 474 181 474 234 _c 474 286 461 328 435 358 _c 409 388 374 404 330 404 _c 526 713 _m 526 623 _l 501 635 476 644 451 650 _c 425 656 400 659 376 659 _c 310 659 260 637 226 593 _c }_e{192 549 172 482 168 394 _c 187 422 211 444 240 459 _c 269 474 301 482 336 482 _c 409 482 467 459 509 415 _c 551 371 573 310 573 234 _c 573 159 550 99 506 54 _c 462 9 403 -13 330 -13 _c 246 -13 181 19 137 83 _c 92 147 70 241 70 364 _c 70 479 97 571 152 639 _c 206 707 280 742 372 742 _c 396 742 421 739 447 735 _c 472 730 498 723 526 713 _c _cl}_e}_d /seven{636 0 82 0 551 729 _sc 82 729 _m 551 729 _l 551 687 _l 286 0 _l 183 0 _l 432 646 _l 82 646 _l 82 729 _l _cl}_d /eight{{636 0 68 -13 568 742 _sc 318 346 _m 271 346 234 333 207 308 _c 180 283 167 249 167 205 _c 167 161 180 126 207 101 _c 234 76 271 64 318 64 _c 364 64 401 76 428 102 _c 455 127 469 161 469 205 _c 469 249 455 283 429 308 _c 402 333 365 346 318 346 _c 219 388 _m 177 398 144 418 120 447 _c 96 476 85 511 85 553 _c 85 611 105 657 147 691 _c 188 725 245 742 318 742 _c }_e{390 742 447 725 489 691 _c 530 657 551 611 551 553 _c 551 511 539 476 515 447 _c 491 418 459 398 417 388 _c 464 377 501 355 528 323 _c 554 291 568 251 568 205 _c 568 134 546 80 503 43 _c 459 5 398 -13 318 -13 _c 237 -13 175 5 132 43 _c 89 80 68 134 68 205 _c 68 251 81 291 108 323 _c 134 355 171 377 219 388 _c 183 544 _m 183 506 194 476 218 455 _c }_e{242 434 275 424 318 424 _c 360 424 393 434 417 455 _c 441 476 453 506 453 544 _c 453 582 441 611 417 632 _c 393 653 360 664 318 664 _c 275 664 242 653 218 632 _c 194 611 183 582 183 544 _c _cl}_e}_d /nine{{636 0 63 -13 566 742 _sc 110 15 _m 110 105 _l 134 93 159 84 185 78 _c 210 72 235 69 260 69 _c 324 69 374 90 408 134 _c 442 178 462 244 468 334 _c 448 306 424 284 396 269 _c 367 254 335 247 300 247 _c 226 247 168 269 126 313 _c 84 357 63 417 63 494 _c 63 568 85 628 129 674 _c 173 719 232 742 306 742 _c 390 742 455 709 499 645 _c 543 580 566 486 566 364 _c }_e{566 248 538 157 484 89 _c 429 21 356 -13 264 -13 _c 239 -13 214 -10 189 -6 _c 163 -2 137 5 110 15 _c 306 324 _m 350 324 385 339 411 369 _c 437 399 450 441 450 494 _c 450 546 437 588 411 618 _c 385 648 350 664 306 664 _c 262 664 227 648 201 618 _c 175 588 162 546 162 494 _c 162 441 175 399 201 369 _c 227 339 262 324 306 324 _c _cl}_e}_d /C{{698 0 56 -13 644 742 _sc 644 673 _m 644 569 _l 610 599 575 622 537 638 _c 499 653 460 661 418 661 _c 334 661 270 635 226 584 _c 182 533 160 460 160 364 _c 160 268 182 194 226 143 _c 270 92 334 67 418 67 _c 460 67 499 74 537 90 _c 575 105 610 128 644 159 _c 644 56 _l 609 32 572 15 534 4 _c 496 -7 455 -13 412 -13 _c 302 -13 215 20 151 87 _c }_e{87 154 56 246 56 364 _c 56 481 87 573 151 641 _c 215 708 302 742 412 742 _c 456 742 497 736 535 725 _c 573 713 610 696 644 673 _c _cl}_e}_d /E{632 0 98 0 568 729 _sc 98 729 _m 559 729 _l 559 646 _l 197 646 _l 197 430 _l 544 430 _l 544 347 _l 197 347 _l 197 83 _l 568 83 _l 568 0 _l 98 0 _l 98 729 _l _cl}_d /a{{613 0 60 -13 522 560 _sc 343 275 _m 270 275 220 266 192 250 _c 164 233 150 205 150 165 _c 150 133 160 107 181 89 _c 202 70 231 61 267 61 _c 317 61 357 78 387 114 _c 417 149 432 196 432 255 _c 432 275 _l 343 275 _l 522 312 _m 522 0 _l 432 0 _l 432 83 _l 411 49 385 25 355 10 _c 325 -5 287 -13 243 -13 _c 187 -13 142 2 109 33 _c 76 64 60 106 60 159 _c }_e{60 220 80 266 122 298 _c 163 329 224 345 306 345 _c 432 345 _l 432 354 _l 432 395 418 427 391 450 _c 364 472 326 484 277 484 _c 245 484 215 480 185 472 _c 155 464 127 453 100 439 _c 100 522 _l 132 534 164 544 195 550 _c 226 556 256 560 286 560 _c 365 560 424 539 463 498 _c 502 457 522 395 522 312 _c _cl}_e}_d /c{{550 0 55 -13 488 560 _sc 488 526 _m 488 442 _l 462 456 437 466 411 473 _c 385 480 360 484 334 484 _c 276 484 230 465 198 428 _c 166 391 150 339 150 273 _c 150 206 166 154 198 117 _c 230 80 276 62 334 62 _c 360 62 385 65 411 72 _c 437 79 462 90 488 104 _c 488 21 _l 462 9 436 0 410 -5 _c 383 -10 354 -13 324 -13 _c 242 -13 176 12 128 64 _c }_e{79 115 55 185 55 273 _c 55 362 79 432 128 483 _c 177 534 244 560 330 560 _c 358 560 385 557 411 551 _c 437 545 463 537 488 526 _c _cl}_e}_d /d{{635 0 55 -13 544 760 _sc 454 464 _m 454 760 _l 544 760 _l 544 0 _l 454 0 _l 454 82 _l 435 49 411 25 382 10 _c 353 -5 319 -13 279 -13 _c 213 -13 159 13 117 65 _c 75 117 55 187 55 273 _c 55 359 75 428 117 481 _c 159 533 213 560 279 560 _c 319 560 353 552 382 536 _c 411 520 435 496 454 464 _c 148 273 _m 148 207 161 155 188 117 _c 215 79 253 61 301 61 _c }_e{348 61 385 79 413 117 _c 440 155 454 207 454 273 _c 454 339 440 390 413 428 _c 385 466 348 485 301 485 _c 253 485 215 466 188 428 _c 161 390 148 339 148 273 _c _cl}_e}_d /e{{615 0 55 -13 562 560 _sc 562 296 _m 562 252 _l 149 252 _l 153 190 171 142 205 110 _c 238 78 284 62 344 62 _c 378 62 412 66 444 74 _c 476 82 509 95 541 113 _c 541 28 _l 509 14 476 3 442 -3 _c 408 -9 373 -13 339 -13 _c 251 -13 182 12 131 62 _c 80 112 55 181 55 268 _c 55 357 79 428 127 481 _c 175 533 241 560 323 560 _c 397 560 455 536 498 489 _c }_e{540 441 562 377 562 296 _c 472 322 _m 471 371 457 410 431 440 _c 404 469 368 484 324 484 _c 274 484 234 469 204 441 _c 174 413 156 373 152 322 _c 472 322 _l _cl}_e}_d /h{634 0 91 0 549 760 _sc 549 330 _m 549 0 _l 459 0 _l 459 327 _l 459 379 448 417 428 443 _c 408 469 378 482 338 482 _c 289 482 251 466 223 435 _c 195 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 760 _l 181 760 _l 181 462 _l 202 494 227 519 257 535 _c 286 551 320 560 358 560 _c 420 560 468 540 500 501 _c 532 462 549 405 549 330 _c _cl}_d /n{634 0 91 0 549 560 _sc 549 330 _m 549 0 _l 459 0 _l 459 327 _l 459 379 448 417 428 443 _c 408 469 378 482 338 482 _c 289 482 251 466 223 435 _c 195 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 202 494 227 519 257 535 _c 286 551 320 560 358 560 _c 420 560 468 540 500 501 _c 532 462 549 405 549 330 _c _cl}_d /o{612 0 55 -13 557 560 _sc 306 484 _m 258 484 220 465 192 427 _c 164 389 150 338 150 273 _c 150 207 163 156 191 118 _c 219 80 257 62 306 62 _c 354 62 392 80 420 118 _c 448 156 462 207 462 273 _c 462 337 448 389 420 427 _c 392 465 354 484 306 484 _c 306 560 _m 384 560 445 534 490 484 _c 534 433 557 363 557 273 _c 557 183 534 113 490 63 _c 445 12 384 -13 306 -13 _c 227 -13 165 12 121 63 _c 77 113 55 183 55 273 _c 55 363 77 433 121 484 _c 165 534 227 560 306 560 _c _cl}_d /p{{635 0 91 -207 580 560 _sc 181 82 _m 181 -207 _l 91 -207 _l 91 547 _l 181 547 _l 181 464 _l 199 496 223 520 252 536 _c 281 552 316 560 356 560 _c 422 560 476 533 518 481 _c 559 428 580 359 580 273 _c 580 187 559 117 518 65 _c 476 13 422 -13 356 -13 _c 316 -13 281 -5 252 10 _c 223 25 199 49 181 82 _c 487 273 _m 487 339 473 390 446 428 _c 418 466 381 485 334 485 _c }_e{286 485 249 466 222 428 _c 194 390 181 339 181 273 _c 181 207 194 155 222 117 _c 249 79 286 61 334 61 _c 381 61 418 79 446 117 _c 473 155 487 207 487 273 _c _cl}_e}_d /s{{521 0 54 -13 472 560 _sc 443 531 _m 443 446 _l 417 458 391 468 364 475 _c 336 481 308 485 279 485 _c 234 485 200 478 178 464 _c 156 450 145 430 145 403 _c 145 382 153 366 169 354 _c 185 342 217 330 265 320 _c 296 313 _l 360 299 405 279 432 255 _c 458 230 472 195 472 151 _c 472 100 452 60 412 31 _c 372 1 316 -13 246 -13 _c 216 -13 186 -10 154 -5 _c }_e{122 0 89 8 54 20 _c 54 113 _l 87 95 120 82 152 74 _c 184 65 216 61 248 61 _c 290 61 323 68 346 82 _c 368 96 380 117 380 144 _c 380 168 371 187 355 200 _c 339 213 303 226 247 238 _c 216 245 _l 160 257 119 275 95 299 _c 70 323 58 356 58 399 _c 58 450 76 490 112 518 _c 148 546 200 560 268 560 _c 301 560 332 557 362 552 _c 391 547 418 540 443 531 _c }_e{_cl}_e}_d /t{392 0 27 0 368 702 _sc 183 702 _m 183 547 _l 368 547 _l 368 477 _l 183 477 _l 183 180 _l 183 135 189 106 201 94 _c 213 81 238 75 276 75 _c 368 75 _l 368 0 _l 276 0 _l 206 0 158 13 132 39 _c 106 65 93 112 93 180 _c 93 477 _l 27 477 _l 27 547 _l 93 547 _l 93 702 _l 183 702 _l _cl}_d end readonly def /BuildGlyph {exch begin CharStrings exch 2 copy known not{pop /.notdef}if true 3 1 roll get exec end}_d /BuildChar { 1 index /Encoding get exch get 1 index /BuildGlyph get exec }_d FontName currentdict end definefont pop end %%EndProlog mpldict begin 13.5 175.5 translate 585 441 0 0 clipbox gsave 0 0 m 585 0 l 585 441 l 0 441 l cl 1.000 setgray fill grestore gsave 73.125 44.1 m 526.5 44.1 l 526.5 396.9 l 73.125 396.9 l cl 1.000 setgray fill grestore 1.000 setlinewidth 1 setlinejoin 2 setlinecap [] 0 setdash 0.165 0.431 0.651 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 387.601 m 74.2584 288.407 l 76.5253 158.306 l 77.6587 147.065 l 78.7922 185.562 l 79.9256 93.9206 l 81.0591 84.5422 l 82.1925 72.9982 l 83.3259 57.9493 l 84.4594 74.725 l 85.5928 67.1141 l 86.7262 53.3638 l 87.8597 46.0309 l 88.9931 45.2127 l 90.1266 50.9954 l 91.26 50.6087 l 92.3934 55.9385 l 93.5269 55.2443 l 94.6603 55.236 l 95.7938 52.2087 l 96.9272 51.8725 l 98.0606 60.412 l 99.1941 59.2652 l 100.328 67.2296 l 101.461 61.4382 l 103.728 71.0837 l 104.861 68.749 l 105.995 66.8455 l 107.128 72.1649 l 108.262 71.7075 l 109.395 72.0564 l 110.528 78.7166 l 111.662 87.0155 l 112.795 78.771 l 113.929 83.0203 l 115.062 83.1324 l 116.196 85.537 l 117.329 83.1459 l 118.463 87.7568 l 119.596 90.3944 l 120.729 92.1016 l 121.863 94.6247 l 122.996 96.5872 l 124.13 96.7321 l 125.263 103.183 l 127.53 102.36 l 128.663 102.604 l 129.797 111.173 l 130.93 108.287 l 132.064 106.505 l 133.197 107.941 l 134.331 111.346 l 135.464 113.182 l 136.597 112.532 l 138.864 116.728 l 139.998 118.993 l 141.131 118.511 l 142.265 122.146 l 143.398 123.466 l 144.532 126.031 l 145.665 125.823 l 146.798 125.951 l 147.932 130.019 l 149.065 131.58 l 150.199 132.281 l 151.332 132.061 l 152.466 135.399 l 153.599 135.238 l 154.733 137.936 l 155.866 139.05 l 156.999 140.727 l 158.133 140.4 l 159.266 142.503 l 160.4 144.841 l 161.533 142.176 l 162.667 145.482 l 163.8 147.664 l 164.933 147.084 l 166.067 149.757 l 167.2 149.074 l 168.334 151.578 l 169.467 150.585 l 170.601 153.933 l 171.734 154.809 l 172.868 155.849 l 174.001 156.311 l 175.134 157.466 l 176.268 158.229 l 177.401 157.612 l 178.535 160.347 l 179.668 161.102 l 180.802 161.051 l 183.068 162.749 l 184.202 163.918 l 185.335 163.778 l 186.469 165.697 l 187.602 163.742 l 188.736 166.495 l 189.869 167.189 l 191.002 166.593 l 192.136 167.797 l 193.269 168.487 l 194.403 168.864 l 195.536 170.573 l 196.67 170.31 l 197.803 172.691 l 198.937 173.69 l 200.07 173.789 l 201.203 173.417 l 202.337 173.434 l 203.47 175.79 l 204.604 176.332 l 205.737 175.723 l 206.871 177.823 l 208.004 177.695 l 209.138 178.791 l 210.271 179.277 l 211.404 179.889 l 212.538 181.219 l 215.938 182.177 l 218.205 184.398 l 219.338 183.751 l 220.472 184.075 l 221.605 185.431 l 222.739 185.813 l 223.872 186.017 l 225.006 186.647 l 226.139 187.829 l 227.273 187.559 l 228.406 188.862 l 229.539 188.927 l 230.673 189.219 l 232.94 190.833 l 234.073 192.239 l 235.207 191.724 l 236.34 192.194 l 237.473 193.337 l 238.607 194.081 l 239.74 194.404 l 240.874 194.186 l 242.007 195.264 l 243.141 195.618 l 244.274 195.832 l 245.408 197.023 l 246.541 196.914 l 247.674 197.112 l 248.808 197.854 l 249.941 198.44 l 251.075 199.233 l 252.208 199.376 l 254.475 200.042 l 255.608 200.608 l 257.875 201.345 l 259.009 201.921 l 261.276 202.811 l 262.409 203.828 l 263.543 203.472 l 264.676 204.047 l 265.809 203.651 l 266.943 203.795 l 269.21 206.48 l 270.343 205.731 l 271.477 207.233 l 272.61 207.386 l 273.743 207.782 l 274.877 208.324 l 278.277 209.133 l 279.411 208.835 l 280.544 210.509 l 281.678 210.294 l 282.811 210.349 l 283.944 210.796 l 285.078 211.497 l 286.211 210.772 l 287.345 211.719 l 288.478 212.043 l 289.612 212.728 l 291.878 213.347 l 293.012 214.158 l 294.145 214.13 l 295.279 214.277 l 296.412 214.735 l 297.546 214.628 l 298.679 215.424 l 299.812 216.53 l 300.946 216.286 l 302.079 216.872 l 303.213 216.725 l 304.346 216.886 l 305.48 217.458 l 306.613 218.155 l 307.747 218.345 l 308.88 218.706 l 310.013 218.384 l 311.147 219.084 l 312.28 219.511 l 313.414 220.104 l 314.547 220.33 l 315.681 221.218 l 316.814 221.339 l 317.947 221.14 l 319.081 221.255 l 321.348 222.743 l 322.481 222.7 l 323.615 222.992 l 324.748 223.833 l 328.148 224.533 l 329.282 224.85 l 331.549 225.229 l 332.682 225.16 l 333.816 225.989 l 334.949 226.41 l 336.083 226.577 l 337.216 227.134 l 339.483 227.311 l 340.616 227.803 l 344.017 228.339 l 345.15 229.069 l 347.417 229.742 l 348.55 230.352 l 350.817 230.594 l 351.951 230.984 l 353.084 231.238 l 354.218 231.881 l 355.351 232.118 l 356.484 232.205 l 357.618 232.82 l 358.751 232.864 l 359.885 233.255 l 361.018 233.764 l 362.152 233.808 l 363.285 234.205 l 367.819 235.408 l 368.952 235.377 l 370.086 235.976 l 373.486 237.207 l 374.619 237.331 l 375.753 237.84 l 376.886 238.075 l 378.02 238.032 l 381.42 239.204 l 382.553 239.184 l 383.687 239.815 l 384.82 239.911 l 385.954 240.287 l 387.087 240.233 l 389.354 241.3 l 390.488 241.377 l 392.754 242.077 l 393.888 242.078 l 395.021 242.194 l 398.422 243.278 l 399.555 243.36 l 400.688 244.043 l 401.822 243.964 l 402.955 244.43 l 404.089 244.738 l 405.222 244.783 l 406.356 245.125 l 407.489 245.623 l 408.623 245.711 l 412.023 246.561 l 415.423 247.182 l 417.69 247.309 l 418.823 247.969 l 419.957 248.013 l 421.09 248.308 l 422.224 248.401 l 423.357 248.998 l 424.491 249.235 l 425.624 249.66 l 427.891 250.183 l 429.024 250.479 l 430.158 250.415 l 431.291 250.751 l 432.425 250.862 l 433.558 251.13 l 434.692 251.246 l 438.092 252.017 l 439.225 252.228 l 442.626 253.346 l 443.759 253.351 l 444.893 253.584 l 446.026 253.979 l 451.693 255.082 l 452.827 255.361 l 455.093 255.612 l 459.627 256.712 l 461.894 257.094 l 463.028 257.583 l 465.294 257.905 l 466.428 257.899 l 468.695 258.618 l 469.828 258.93 l 472.095 259.097 l 474.362 259.673 l 477.762 260.231 l 480.029 260.77 l 481.163 260.867 l 482.296 261.216 l 485.696 261.795 l 486.83 261.977 l 487.963 261.994 l 489.097 262.389 l 490.23 262.371 l 492.497 262.916 l 495.897 263.417 l 498.164 263.814 l 499.298 264.183 l 502.698 264.967 l 503.831 264.983 l 504.965 265.299 l 508.365 265.796 l 510.632 266.414 l 512.899 266.752 l 514.032 267.091 l 515.166 267.295 l 516.299 267.191 l 517.433 267.524 l 518.566 267.627 l 519.699 267.899 l 520.833 267.915 l 521.966 268.339 l 524.233 268.642 l 525.367 268.775 l 525.367 268.775 l stroke grestore 0.500 setlinewidth 0 setlinecap [1 3] 0 setdash 0.000 setgray gsave 453.4 352.8 73.12 44.1 clipbox 73.125 44.1 m 73.125 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 396.9 o grestore /DejaVuSans findfont 12.000 scalefont setfont gsave 70.101562 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 129.797 44.1 m 129.797 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 129.797 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 129.797 396.9 o grestore gsave 123.015625 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /five glyphshow 7.634766 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 186.469 44.1 m 186.469 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 186.469 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 186.469 396.9 o grestore gsave 176.062500 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 243.141 44.1 m 243.141 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 243.141 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 243.141 396.9 o grestore gsave 232.734375 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /five glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 299.812 44.1 m 299.812 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 299.812 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 299.812 396.9 o grestore gsave 289.187500 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /two glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 356.484 44.1 m 356.484 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 356.484 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 356.484 396.9 o grestore gsave 345.859375 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /two glyphshow 7.634766 0.000000 m /five glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 413.156 44.1 m 413.156 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 413.156 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 413.156 396.9 o grestore gsave 402.554688 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /three glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 469.828 44.1 m 469.828 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 469.828 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 469.828 396.9 o grestore gsave 459.226563 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /three glyphshow 7.634766 0.000000 m /five glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 526.5 44.1 m 526.5 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 396.9 o grestore gsave 515.734375 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /four glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore gsave 282.531250 14.350000 translate 0.000000 rotate 0.000000 0.000000 m /E glyphshow 7.582031 0.000000 m /p glyphshow 15.199219 0.000000 m /o glyphshow 22.541016 0.000000 m /c glyphshow 29.138672 0.000000 m /h glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 44.1 m 526.5 44.1 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 44.1 o grestore gsave 52.546875 40.787500 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /two glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 83.3 m 526.5 83.3 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 83.3 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 83.3 o grestore gsave 52.312500 79.987500 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /three glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 122.5 m 526.5 122.5 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 122.5 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 122.5 o grestore gsave 52.015625 119.187500 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /four glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 161.7 m 526.5 161.7 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 161.7 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 161.7 o grestore gsave 52.390625 158.387500 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /five glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 200.9 m 526.5 200.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 200.9 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 200.9 o grestore gsave 52.109375 197.587500 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /six glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 240.1 m 526.5 240.1 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 240.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 240.1 o grestore gsave 52.375000 236.787500 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /seven glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 279.3 m 526.5 279.3 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 279.3 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 279.3 o grestore gsave 52.171875 275.987500 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /eight glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 318.5 m 526.5 318.5 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 318.5 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 318.5 o grestore gsave 52.187500 315.187500 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /nine glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 357.7 m 526.5 357.7 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 357.7 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 357.7 o grestore gsave 51.703125 354.387500 translate 0.000000 rotate 0.000000 0.000000 m /two glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 396.9 m 526.5 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 396.9 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 396.9 o grestore gsave 52.015625 393.587500 translate 0.000000 rotate 0.000000 0.000000 m /two glyphshow 7.634766 0.000000 m /period glyphshow 11.449219 0.000000 m /one glyphshow grestore 1.000 setlinewidth gsave 73.125 396.9 m 526.5 396.9 l stroke grestore gsave 526.5 44.1 m 526.5 396.9 l stroke grestore gsave 73.125 44.1 m 526.5 44.1 l stroke grestore gsave 73.125 44.1 m 73.125 396.9 l stroke grestore /DejaVuSans findfont 14.400 scalefont setfont gsave 224.585938 401.900000 translate 0.000000 rotate 0.000000 0.000000 m /C glyphshow 10.048141 0.000000 m /o glyphshow 18.852554 0.000000 m /s glyphshow 26.350006 0.000000 m /t glyphshow 31.992416 0.000000 m /space glyphshow 36.566772 0.000000 m /o glyphshow 45.371185 0.000000 m /n glyphshow 54.491806 0.000000 m /space glyphshow 59.066162 0.000000 m /t glyphshow 64.708572 0.000000 m /h glyphshow 73.829193 0.000000 m /e glyphshow 82.682800 0.000000 m /space glyphshow 87.257156 0.000000 m /t glyphshow 92.899567 0.000000 m /e glyphshow 101.753174 0.000000 m /s glyphshow 109.250626 0.000000 m /t glyphshow 114.893036 0.000000 m /space glyphshow 119.467392 0.000000 m /d glyphshow 128.602066 0.000000 m /a glyphshow 137.420532 0.000000 m /t glyphshow 143.062943 0.000000 m /a glyphshow grestore end showpage ```
/content/code_sandbox/images/overfitting3.eps
postscript
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
15,458
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm}, font=\footnotesize ] \node (neuron) [neuron] {}; \node (input) [left=2 of neuron] {}; \node (output) [right=1.5 of neuron] {}; \node [above] at (neuron.north) {bias $b$}; \draw[->] (input) to node [above] {weight $w$} (neuron); \draw[->] (neuron) to (output); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz28.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
202
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=8mm}, font=\footnotesize ] % left layers: \foreach \y in {0,...,3} \node (l\y) at (0, \y * 1.25 + 1 * 1.25) [neuron] {}; % right layers: \foreach \y in {0,...,2} \node (r\y) at (2, \y * 1.25 + 1 * 1.25) [neuron,dotted] {}; \node (r3) at (2, 3 * 1.25 + 1.25) [neuron] {}; % right text: \foreach \y in {0,...,3} \node (tr\y) [right=0.5 of r\y] {$\ldots$}; % bottom text: \node [below=0.5 of l0,rotate=-90,yshift=1.5mm] {$\ldots$}; \node [below=0.5 of r0,rotate=-90,yshift=1.5mm] {$\ldots$}; \node [below=0.5 of tr0,rotate=-45,xshift=2mm] {$\ldots$}; \foreach \x in {0,...,3} \draw [->] (l\x) to (r3); \foreach \x in {0,...,3} \foreach \y in {0,...,2} \draw [dotted,->] (l\x) to (r\y); % \draw[->] (r0) -- ++(1,0); % \draw[->] (r1) -- ++(1,0); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz32.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
479
```postscript %!PS-Adobe-3.0 EPSF-3.0 %%Creator: (MATLAB, The Mathworks, Inc. Version 8.6.0.267246 \(R2015b\). Operating System: Mac OS X) %%Title: /Users/zhanggyb/Workspace/github/nndl/images/polynomial_fit.eps %%CreationDate: 2016-01-30T20:25:51 %%Pages: (atend) %%BoundingBox: 0 0 560 420 %%LanguageLevel: 2 %%EndComments %%BeginProlog %%BeginResource: procset (Apache XML Graphics Std ProcSet) 1.2 0 %%Version: 1.2 0 /bd{bind def}bind def /ld{load def}bd /GR/grestore ld /M/moveto ld /LJ/setlinejoin ld /C/curveto ld /f/fill ld /LW/setlinewidth ld /GC/setgray ld /t/show ld /N/newpath ld /CT/concat ld /cp/closepath ld /S/stroke ld /L/lineto ld /CC/setcmykcolor ld /A/ashow ld /GS/gsave ld /RC/setrgbcolor ld /RM/rmoveto ld /ML/setmiterlimit ld /re {4 2 roll M 1 index 0 rlineto 0 exch rlineto neg 0 rlineto cp } bd /_ctm matrix def /_tm matrix def /BT { _ctm currentmatrix pop matrix _tm copy pop 0 0 moveto } bd /ET { _ctm setmatrix } bd /iTm { _ctm setmatrix _tm concat } bd /Tm { _tm astore pop iTm 0 0 moveto } bd /ux 0.0 def /uy 0.0 def /F { /Tp exch def /Tf exch def Tf findfont Tp scalefont setfont /cf Tf def /cs Tp def } bd /ULS {currentpoint /uy exch def /ux exch def} bd /ULE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add moveto Tcx uy To add lineto Tt setlinewidth stroke grestore } bd /OLE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add cs add moveto Tcx uy To add cs add lineto Tt setlinewidth stroke grestore } bd /SOE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add cs 10 mul 26 idiv add moveto Tcx uy To add cs 10 mul 26 idiv add lineto Tt setlinewidth stroke grestore } bd /QT { /Y22 exch store /X22 exch store /Y21 exch store /X21 exch store currentpoint /Y21 load 2 mul add 3 div exch /X21 load 2 mul add 3 div exch /X21 load 2 mul /X22 load add 3 div /Y21 load 2 mul /Y22 load add 3 div /X22 load /Y22 load curveto } bd /SSPD { dup length /d exch dict def { /v exch def /k exch def currentpagedevice k known { /cpdv currentpagedevice k get def v cpdv ne { /upd false def /nullv v type /nulltype eq def /nullcpdv cpdv type /nulltype eq def nullv nullcpdv or { /upd true def } { /sametype v type cpdv type eq def sametype { v type /arraytype eq { /vlen v length def /cpdvlen cpdv length def vlen cpdvlen eq { 0 1 vlen 1 sub { /i exch def /obj v i get def /cpdobj cpdv i get def obj cpdobj ne { /upd true def exit } if } for } { /upd true def } ifelse } { v type /dicttype eq { v { /dv exch def /dk exch def /cpddv cpdv dk get def dv cpddv ne { /upd true def exit } if } forall } { /upd true def } ifelse } ifelse } if } ifelse upd true eq { d k v put } if } if } if } forall d length 0 gt { d setpagedevice } if } bd %%EndResource %%BeginResource: procset (Apache XML Graphics EPS ProcSet) 1.0 0 %%Version: 1.0 0 /BeginEPSF { %def /b4_Inc_state save def % Save state for cleanup /dict_count countdictstack def % Count objects on dict stack /op_count count 1 sub def % Count objects on operand stack userdict begin % Push userdict on dict stack /showpage { } def % Redefine showpage, { } = null proc 0 setgray 0 setlinecap % Prepare graphics state 1 setlinewidth 0 setlinejoin 10 setmiterlimit [ ] 0 setdash newpath /languagelevel where % If level not equal to 1 then {pop languagelevel % set strokeadjust and 1 ne % overprint to their defaults. {false setstrokeadjust false setoverprint } if } if } bd /EndEPSF { %def count op_count sub {pop} repeat % Clean up stacks countdictstack dict_count sub {end} repeat b4_Inc_state restore } bd %%EndResource %FOPBeginFontDict %%IncludeResource: font Courier-Bold %%IncludeResource: font Helvetica %%IncludeResource: font Courier-BoldOblique %%IncludeResource: font Courier-Oblique %%IncludeResource: font Times-Roman %%IncludeResource: font Helvetica-BoldOblique %%IncludeResource: font Helvetica-Bold %%IncludeResource: font Helvetica-Oblique %%IncludeResource: font Times-BoldItalic %%IncludeResource: font Courier %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Bold %%IncludeResource: font Symbol %%IncludeResource: font ZapfDingbats %FOPEndFontDict %%BeginResource: encoding WinAnsiEncoding /WinAnsiEncoding [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /bullet /Euro /bullet /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /bullet /Zcaron /bullet /bullet /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /asciitilde /trademark /scaron /guilsinglright /oe /bullet /zcaron /Ydieresis /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /sfthyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /middot /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndResource %FOPBeginFontReencode /Courier-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-Bold exch definefont pop /Helvetica findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica exch definefont pop /Courier-BoldOblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-BoldOblique exch definefont pop /Courier-Oblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-Oblique exch definefont pop /Times-Roman findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Roman exch definefont pop /Helvetica-BoldOblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-BoldOblique exch definefont pop /Helvetica-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-Bold exch definefont pop /Helvetica-Oblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-Oblique exch definefont pop /Times-BoldItalic findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-BoldItalic exch definefont pop /Courier findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier exch definefont pop /Times-Italic findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Italic exch definefont pop /Times-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Bold exch definefont pop %FOPEndFontReencode %%EndProlog %%Page: 1 1 %%PageBoundingBox: 0 0 560 420 %%BeginPageSetup [1 0 0 -1 0 420] CT %%EndPageSetup GS 1 GC N 0 0 560 420 re f GR GS 1 GC N 0 0 560 420 re f GR GS 1 GC N 73 374 M 507 374 L 507 31 L 73 31 L cp f GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 507 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 507 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 73 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 121.222 374 M 121.222 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 169.444 374 M 169.444 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 217.667 374 M 217.667 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 265.889 374 M 265.889 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 314.111 374 M 314.111 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 362.333 374 M 362.333 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 410.556 374 M 410.556 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 458.778 374 M 458.778 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 507 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 73 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 121.222 31 M 121.222 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 169.444 31 M 169.444 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 217.667 31 M 217.667 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 265.889 31 M 265.889 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 314.111 31 M 314.111 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 362.333 31 M 362.333 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 410.556 31 M 410.556 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 458.778 31 M 458.778 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 31 M 507 35.34 L S GR GS [1 0 0 1 73 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (0.5) t GR GR GS [1 0 0 1 121.22222 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (1) t GR GR GS [1 0 0 1 169.44444 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (1.5) t GR GR GS [1 0 0 1 217.66667 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (2) t GR GR GS [1 0 0 1 265.88889 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (2.5) t GR GR GS [1 0 0 1 314.11111 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (3) t GR GR GS [1 0 0 1 362.33334 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (3.5) t GR GR GS [1 0 0 1 410.55554 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (4) t GR GR GS [1 0 0 1 458.77777 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (4.5) t GR GR GS [1 0 0 1 507 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (5) t GR GR GS [1 0 0 1 284 401] CT 0.149 GC /Helvetica-BoldItalic 12 F GS [1 0 0 1 0 0] CT 0 0 moveto 1 -1 scale ( x) t GR GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 73 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 507 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 77.34 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 335.889 M 77.34 335.889 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 297.778 M 77.34 297.778 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 259.667 M 77.34 259.667 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 221.556 M 77.34 221.556 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 183.444 M 77.34 183.444 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 145.333 M 77.34 145.333 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 107.222 M 77.34 107.222 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 69.111 M 77.34 69.111 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 77.34 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 502.66 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 335.889 M 502.66 335.889 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 297.778 M 502.66 297.778 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 259.667 M 502.66 259.667 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 221.556 M 502.66 221.556 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 183.444 M 502.66 183.444 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 145.333 M 502.66 145.333 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 107.222 M 502.66 107.222 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 69.111 M 502.66 69.111 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 31 M 502.66 31 L S GR GS [1 0 0 1 68.8 374] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (1) t GR GR GS [1 0 0 1 68.8 335.88889] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (2) t GR GR GS [1 0 0 1 68.8 297.77777] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (3) t GR GR GS [1 0 0 1 68.8 259.66666] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (4) t GR GR GS [1 0 0 1 68.8 221.55556] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (5) t GR GR GS [1 0 0 1 68.8 183.44444] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (6) t GR GR GS [1 0 0 1 68.8 145.33333] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (7) t GR GR GS [1 0 0 1 68.8 107.22222] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (8) t GR GR GS [1 0 0 1 68.8 69.11111] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (9) t GR GR GS [1 0 0 1 68.8 31] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -13 3 moveto 1 -1 scale (10) t GR GR GS [0 -1 1 0 50 208] CT 0.149 GC /Helvetica-BoldItalic 12 F GS [1 0 0 1 0 0] CT 0 0 moveto 1 -1 scale ( y) t GR GR GS [1 0 0 1 118.99658 316.40988] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 167.96068 304.5531] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 216.92479 251.19753] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 274.04959 221.55556] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 298.53165 188.94939] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 355.6564 162.27161] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 371.97778 150.41481] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 384.21878 132.62962] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 420.94186 100.02347] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 461.7453 73.34566] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS 0 0 1 RC 1 LJ 0.5 LW N 116.4 352.984 M 121.222 294.011 L 126.044 266.947 L 130.867 259.948 L 135.689 264.365 L 140.511 274.105 L 145.333 285.078 L 150.156 294.74 L 154.978 301.701 L 159.8 305.413 L 164.622 305.902 L 169.444 303.568 L 174.267 299.018 L 179.089 292.944 L 183.911 286.033 L 188.733 278.902 L 193.556 272.06 L 198.378 265.889 L 203.2 260.63 L 208.022 256.399 L 212.844 253.189 L 217.667 250.899 L 222.489 249.349 L 227.311 248.311 L 232.133 247.525 L 236.956 246.731 L 241.778 245.681 L 246.6 244.159 L 251.422 241.997 L 256.244 239.081 L 261.067 235.355 L 265.889 230.829 L 270.711 225.568 L 275.533 219.691 L 280.356 213.359 L 285.178 206.769 L 290 200.134 L 294.822 193.671 L 299.644 187.59 L 304.467 182.076 L 309.289 177.276 L 314.111 173.289 L 318.933 170.16 L 323.756 167.869 L 328.578 166.333 L 333.4 165.406 L 338.222 164.885 L 343.044 164.525 L 347.867 164.044 L 352.689 163.15 L S GR GS 0 0 1 RC 1 LJ 0.5 LW N 347.867 164.044 M 352.689 163.15 L 357.511 161.561 L 362.333 159.023 L 367.156 155.344 L 371.978 150.415 L 376.8 144.235 L 381.622 136.934 L 386.444 128.789 L 391.267 120.227 L 396.089 111.829 L 400.911 104.305 L 405.733 98.461 L 410.556 95.138 L 415.378 95.127 L 420.2 99.047 L 425.022 107.188 L 429.844 119.309 L 434.667 134.381 L 439.489 150.273 L 444.311 163.376 L 449.133 168.139 L 453.956 156.533 L 458.778 117.412 L 463.6 35.772 L S GR %%Trailer %%Pages: 1 %%EOF ```
/content/code_sandbox/images/polynomial_fit.eps
postscript
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
8,694
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage{pgfplots} \usetikzlibrary{positioning} \input{../plots} \begin{document} \manipulateTiGraph{8}{-5} \end{document} ```
/content/code_sandbox/images/ti_graph.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
83
```postscript %!PS-Adobe-3.0 EPSF-3.0 %%Title: /home/zhanggyb/figure_2.eps %%Creator: matplotlib version 1.3.1, path_to_url %%CreationDate: Wed Mar 16 10:50:13 2016 %%Orientation: portrait %%BoundingBox: 13 175 598 616 %%EndComments %%BeginProlog /mpldict 8 dict def mpldict begin /m { moveto } bind def /l { lineto } bind def /r { rlineto } bind def /c { curveto } bind def /cl { closepath } bind def /box { m 1 index 0 r 0 exch r neg 0 r cl } bind def /clipbox { box clip newpath } bind def %!PS-Adobe-3.0 Resource-Font %%Title: DejaVu Sans %%Creator: Converted from TrueType to type 3 by PPR 25 dict begin /_d{bind def}bind def /_m{moveto}_d /_l{lineto}_d /_cl{closepath eofill}_d /_c{curveto}_d /_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d /_e{exec}_d /FontName /DejaVuSans def /PaintType 0 def /FontMatrix[.001 0 0 .001 0 0]def /FontBBox[-1021 -415 1681 1167]def /FontType 3 def /Encoding [ /space /hyphen /zero /one /two /three /four /five /colon /H /N /S /a /b /c /d /e /f /g /h /i /l /m /n /o /p /r /s /t /u /y ] def /FontInfo 10 dict dup begin /FamilyName (DejaVu Sans) def /FullName (DejaVu Sans) def /Weight (Book) def /Version (Version 2.34) def /ItalicAngle 0.0 def /isFixedPitch false def /UnderlinePosition -130 def /UnderlineThickness 90 def end readonly def /CharStrings 31 dict dup begin /space{318 0 0 0 0 0 _sc }_d /hyphen{361 0 49 234 312 314 _sc 49 314 _m 312 314 _l 312 234 _l 49 234 _l 49 314 _l _cl}_d /zero{636 0 66 -13 570 742 _sc 318 664 _m 267 664 229 639 203 589 _c 177 539 165 464 165 364 _c 165 264 177 189 203 139 _c 229 89 267 64 318 64 _c 369 64 407 89 433 139 _c 458 189 471 264 471 364 _c 471 464 458 539 433 589 _c 407 639 369 664 318 664 _c 318 742 _m 399 742 461 709 505 645 _c 548 580 570 486 570 364 _c 570 241 548 147 505 83 _c 461 19 399 -13 318 -13 _c 236 -13 173 19 130 83 _c 87 147 66 241 66 364 _c 66 486 87 580 130 645 _c 173 709 236 742 318 742 _c _cl}_d /one{636 0 110 0 544 729 _sc 124 83 _m 285 83 _l 285 639 _l 110 604 _l 110 694 _l 284 729 _l 383 729 _l 383 83 _l 544 83 _l 544 0 _l 124 0 _l 124 83 _l _cl}_d /two{{636 0 73 0 536 742 _sc 192 83 _m 536 83 _l 536 0 _l 73 0 _l 73 83 _l 110 121 161 173 226 239 _c 290 304 331 346 348 365 _c 380 400 402 430 414 455 _c 426 479 433 504 433 528 _c 433 566 419 598 392 622 _c 365 646 330 659 286 659 _c 255 659 222 653 188 643 _c 154 632 117 616 78 594 _c 78 694 _l 118 710 155 722 189 730 _c 223 738 255 742 284 742 _c }_e{359 742 419 723 464 685 _c 509 647 532 597 532 534 _c 532 504 526 475 515 449 _c 504 422 484 390 454 354 _c 446 344 420 317 376 272 _c 332 227 271 164 192 83 _c _cl}_e}_d /three{{636 0 76 -13 556 742 _sc 406 393 _m 453 383 490 362 516 330 _c 542 298 556 258 556 212 _c 556 140 531 84 482 45 _c 432 6 362 -13 271 -13 _c 240 -13 208 -10 176 -4 _c 144 1 110 10 76 22 _c 76 117 _l 103 101 133 89 166 81 _c 198 73 232 69 268 69 _c 330 69 377 81 409 105 _c 441 129 458 165 458 212 _c 458 254 443 288 413 312 _c 383 336 341 349 287 349 _c }_e{202 349 _l 202 430 _l 291 430 _l 339 430 376 439 402 459 _c 428 478 441 506 441 543 _c 441 580 427 609 401 629 _c 374 649 336 659 287 659 _c 260 659 231 656 200 650 _c 169 644 135 635 98 623 _c 98 711 _l 135 721 170 729 203 734 _c 235 739 266 742 296 742 _c 370 742 429 725 473 691 _c 517 657 539 611 539 553 _c 539 513 527 479 504 451 _c 481 423 448 403 406 393 _c _cl}_e}_d /four{636 0 49 0 580 729 _sc 378 643 _m 129 254 _l 378 254 _l 378 643 _l 352 729 _m 476 729 _l 476 254 _l 580 254 _l 580 172 _l 476 172 _l 476 0 _l 378 0 _l 378 172 _l 49 172 _l 49 267 _l 352 729 _l _cl}_d /five{{636 0 77 -13 549 729 _sc 108 729 _m 495 729 _l 495 646 _l 198 646 _l 198 467 _l 212 472 227 476 241 478 _c 255 480 270 482 284 482 _c 365 482 429 459 477 415 _c 525 370 549 310 549 234 _c 549 155 524 94 475 51 _c 426 8 357 -13 269 -13 _c 238 -13 207 -10 175 -6 _c 143 -1 111 6 77 17 _c 77 116 _l 106 100 136 88 168 80 _c 199 72 232 69 267 69 _c }_e{323 69 368 83 401 113 _c 433 143 450 183 450 234 _c 450 284 433 324 401 354 _c 368 384 323 399 267 399 _c 241 399 214 396 188 390 _c 162 384 135 375 108 363 _c 108 729 _l _cl}_e}_d /colon{337 0 117 0 220 517 _sc 117 124 _m 220 124 _l 220 0 _l 117 0 _l 117 124 _l 117 517 _m 220 517 _l 220 393 _l 117 393 _l 117 517 _l _cl}_d /H{752 0 98 0 654 729 _sc 98 729 _m 197 729 _l 197 430 _l 555 430 _l 555 729 _l 654 729 _l 654 0 _l 555 0 _l 555 347 _l 197 347 _l 197 0 _l 98 0 _l 98 729 _l _cl}_d /N{748 0 98 0 650 729 _sc 98 729 _m 231 729 _l 554 119 _l 554 729 _l 650 729 _l 650 0 _l 517 0 _l 194 610 _l 194 0 _l 98 0 _l 98 729 _l _cl}_d /S{{635 0 66 -13 579 742 _sc 535 705 _m 535 609 _l 497 627 462 640 429 649 _c 395 657 363 662 333 662 _c 279 662 237 651 208 631 _c 179 610 165 580 165 542 _c 165 510 174 485 194 469 _c 213 452 250 439 304 429 _c 364 417 _l 437 403 491 378 526 343 _c 561 307 579 260 579 201 _c 579 130 555 77 508 41 _c 460 5 391 -13 300 -13 _c 265 -13 228 -9 189 -2 _c }_e{150 5 110 16 69 32 _c 69 134 _l 109 111 148 94 186 83 _c 224 71 262 66 300 66 _c 356 66 399 77 430 99 _c 460 121 476 152 476 194 _c 476 230 465 258 443 278 _c 421 298 385 313 335 323 _c 275 335 _l 201 349 148 372 115 404 _c 82 435 66 478 66 534 _c 66 598 88 649 134 686 _c 179 723 242 742 322 742 _c 356 742 390 739 426 733 _c 461 727 497 717 535 705 _c }_e{_cl}_e}_d /a{{613 0 60 -13 522 560 _sc 343 275 _m 270 275 220 266 192 250 _c 164 233 150 205 150 165 _c 150 133 160 107 181 89 _c 202 70 231 61 267 61 _c 317 61 357 78 387 114 _c 417 149 432 196 432 255 _c 432 275 _l 343 275 _l 522 312 _m 522 0 _l 432 0 _l 432 83 _l 411 49 385 25 355 10 _c 325 -5 287 -13 243 -13 _c 187 -13 142 2 109 33 _c 76 64 60 106 60 159 _c }_e{60 220 80 266 122 298 _c 163 329 224 345 306 345 _c 432 345 _l 432 354 _l 432 395 418 427 391 450 _c 364 472 326 484 277 484 _c 245 484 215 480 185 472 _c 155 464 127 453 100 439 _c 100 522 _l 132 534 164 544 195 550 _c 226 556 256 560 286 560 _c 365 560 424 539 463 498 _c 502 457 522 395 522 312 _c _cl}_e}_d /b{{635 0 91 -13 580 760 _sc 487 273 _m 487 339 473 390 446 428 _c 418 466 381 485 334 485 _c 286 485 249 466 222 428 _c 194 390 181 339 181 273 _c 181 207 194 155 222 117 _c 249 79 286 61 334 61 _c 381 61 418 79 446 117 _c 473 155 487 207 487 273 _c 181 464 _m 199 496 223 520 252 536 _c 281 552 316 560 356 560 _c 422 560 476 533 518 481 _c 559 428 580 359 580 273 _c }_e{580 187 559 117 518 65 _c 476 13 422 -13 356 -13 _c 316 -13 281 -5 252 10 _c 223 25 199 49 181 82 _c 181 0 _l 91 0 _l 91 760 _l 181 760 _l 181 464 _l _cl}_e}_d /c{{550 0 55 -13 488 560 _sc 488 526 _m 488 442 _l 462 456 437 466 411 473 _c 385 480 360 484 334 484 _c 276 484 230 465 198 428 _c 166 391 150 339 150 273 _c 150 206 166 154 198 117 _c 230 80 276 62 334 62 _c 360 62 385 65 411 72 _c 437 79 462 90 488 104 _c 488 21 _l 462 9 436 0 410 -5 _c 383 -10 354 -13 324 -13 _c 242 -13 176 12 128 64 _c }_e{79 115 55 185 55 273 _c 55 362 79 432 128 483 _c 177 534 244 560 330 560 _c 358 560 385 557 411 551 _c 437 545 463 537 488 526 _c _cl}_e}_d /d{{635 0 55 -13 544 760 _sc 454 464 _m 454 760 _l 544 760 _l 544 0 _l 454 0 _l 454 82 _l 435 49 411 25 382 10 _c 353 -5 319 -13 279 -13 _c 213 -13 159 13 117 65 _c 75 117 55 187 55 273 _c 55 359 75 428 117 481 _c 159 533 213 560 279 560 _c 319 560 353 552 382 536 _c 411 520 435 496 454 464 _c 148 273 _m 148 207 161 155 188 117 _c 215 79 253 61 301 61 _c }_e{348 61 385 79 413 117 _c 440 155 454 207 454 273 _c 454 339 440 390 413 428 _c 385 466 348 485 301 485 _c 253 485 215 466 188 428 _c 161 390 148 339 148 273 _c _cl}_e}_d /e{{615 0 55 -13 562 560 _sc 562 296 _m 562 252 _l 149 252 _l 153 190 171 142 205 110 _c 238 78 284 62 344 62 _c 378 62 412 66 444 74 _c 476 82 509 95 541 113 _c 541 28 _l 509 14 476 3 442 -3 _c 408 -9 373 -13 339 -13 _c 251 -13 182 12 131 62 _c 80 112 55 181 55 268 _c 55 357 79 428 127 481 _c 175 533 241 560 323 560 _c 397 560 455 536 498 489 _c }_e{540 441 562 377 562 296 _c 472 322 _m 471 371 457 410 431 440 _c 404 469 368 484 324 484 _c 274 484 234 469 204 441 _c 174 413 156 373 152 322 _c 472 322 _l _cl}_e}_d /f{352 0 23 0 371 760 _sc 371 760 _m 371 685 _l 285 685 _l 253 685 230 678 218 665 _c 205 652 199 629 199 595 _c 199 547 _l 347 547 _l 347 477 _l 199 477 _l 199 0 _l 109 0 _l 109 477 _l 23 477 _l 23 547 _l 109 547 _l 109 585 _l 109 645 123 690 151 718 _c 179 746 224 760 286 760 _c 371 760 _l _cl}_d /g{{635 0 55 -207 544 560 _sc 454 280 _m 454 344 440 395 414 431 _c 387 467 349 485 301 485 _c 253 485 215 467 188 431 _c 161 395 148 344 148 280 _c 148 215 161 165 188 129 _c 215 93 253 75 301 75 _c 349 75 387 93 414 129 _c 440 165 454 215 454 280 _c 544 68 _m 544 -24 523 -93 482 -139 _c 440 -184 377 -207 292 -207 _c 260 -207 231 -204 203 -200 _c 175 -195 147 -188 121 -178 _c }_e{121 -91 _l 147 -105 173 -115 199 -122 _c 225 -129 251 -133 278 -133 _c 336 -133 380 -117 410 -87 _c 439 -56 454 -10 454 52 _c 454 96 _l 435 64 411 40 382 24 _c 353 8 319 0 279 0 _c 211 0 157 25 116 76 _c 75 127 55 195 55 280 _c 55 364 75 432 116 483 _c 157 534 211 560 279 560 _c 319 560 353 552 382 536 _c 411 520 435 496 454 464 _c 454 547 _l 544 547 _l }_e{544 68 _l _cl}_e}_d /h{634 0 91 0 549 760 _sc 549 330 _m 549 0 _l 459 0 _l 459 327 _l 459 379 448 417 428 443 _c 408 469 378 482 338 482 _c 289 482 251 466 223 435 _c 195 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 760 _l 181 760 _l 181 462 _l 202 494 227 519 257 535 _c 286 551 320 560 358 560 _c 420 560 468 540 500 501 _c 532 462 549 405 549 330 _c _cl}_d /i{278 0 94 0 184 760 _sc 94 547 _m 184 547 _l 184 0 _l 94 0 _l 94 547 _l 94 760 _m 184 760 _l 184 646 _l 94 646 _l 94 760 _l _cl}_d /l{278 0 94 0 184 760 _sc 94 760 _m 184 760 _l 184 0 _l 94 0 _l 94 760 _l _cl}_d /m{{974 0 91 0 889 560 _sc 520 442 _m 542 482 569 511 600 531 _c 631 550 668 560 711 560 _c 767 560 811 540 842 500 _c 873 460 889 403 889 330 _c 889 0 _l 799 0 _l 799 327 _l 799 379 789 418 771 444 _c 752 469 724 482 686 482 _c 639 482 602 466 575 435 _c 548 404 535 362 535 309 _c 535 0 _l 445 0 _l 445 327 _l 445 379 435 418 417 444 _c 398 469 369 482 331 482 _c }_e{285 482 248 466 221 435 _c 194 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 201 495 226 520 255 536 _c 283 552 317 560 357 560 _c 397 560 430 550 458 530 _c 486 510 506 480 520 442 _c _cl}_e}_d /n{634 0 91 0 549 560 _sc 549 330 _m 549 0 _l 459 0 _l 459 327 _l 459 379 448 417 428 443 _c 408 469 378 482 338 482 _c 289 482 251 466 223 435 _c 195 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 202 494 227 519 257 535 _c 286 551 320 560 358 560 _c 420 560 468 540 500 501 _c 532 462 549 405 549 330 _c _cl}_d /o{612 0 55 -13 557 560 _sc 306 484 _m 258 484 220 465 192 427 _c 164 389 150 338 150 273 _c 150 207 163 156 191 118 _c 219 80 257 62 306 62 _c 354 62 392 80 420 118 _c 448 156 462 207 462 273 _c 462 337 448 389 420 427 _c 392 465 354 484 306 484 _c 306 560 _m 384 560 445 534 490 484 _c 534 433 557 363 557 273 _c 557 183 534 113 490 63 _c 445 12 384 -13 306 -13 _c 227 -13 165 12 121 63 _c 77 113 55 183 55 273 _c 55 363 77 433 121 484 _c 165 534 227 560 306 560 _c _cl}_d /p{{635 0 91 -207 580 560 _sc 181 82 _m 181 -207 _l 91 -207 _l 91 547 _l 181 547 _l 181 464 _l 199 496 223 520 252 536 _c 281 552 316 560 356 560 _c 422 560 476 533 518 481 _c 559 428 580 359 580 273 _c 580 187 559 117 518 65 _c 476 13 422 -13 356 -13 _c 316 -13 281 -5 252 10 _c 223 25 199 49 181 82 _c 487 273 _m 487 339 473 390 446 428 _c 418 466 381 485 334 485 _c }_e{286 485 249 466 222 428 _c 194 390 181 339 181 273 _c 181 207 194 155 222 117 _c 249 79 286 61 334 61 _c 381 61 418 79 446 117 _c 473 155 487 207 487 273 _c _cl}_e}_d /r{411 0 91 0 411 560 _sc 411 463 _m 401 469 390 473 378 476 _c 366 478 353 480 339 480 _c 288 480 249 463 222 430 _c 194 397 181 350 181 288 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 199 495 224 520 254 536 _c 284 552 321 560 365 560 _c 371 560 378 559 386 559 _c 393 558 401 557 411 555 _c 411 463 _l _cl}_d /s{{521 0 54 -13 472 560 _sc 443 531 _m 443 446 _l 417 458 391 468 364 475 _c 336 481 308 485 279 485 _c 234 485 200 478 178 464 _c 156 450 145 430 145 403 _c 145 382 153 366 169 354 _c 185 342 217 330 265 320 _c 296 313 _l 360 299 405 279 432 255 _c 458 230 472 195 472 151 _c 472 100 452 60 412 31 _c 372 1 316 -13 246 -13 _c 216 -13 186 -10 154 -5 _c }_e{122 0 89 8 54 20 _c 54 113 _l 87 95 120 82 152 74 _c 184 65 216 61 248 61 _c 290 61 323 68 346 82 _c 368 96 380 117 380 144 _c 380 168 371 187 355 200 _c 339 213 303 226 247 238 _c 216 245 _l 160 257 119 275 95 299 _c 70 323 58 356 58 399 _c 58 450 76 490 112 518 _c 148 546 200 560 268 560 _c 301 560 332 557 362 552 _c 391 547 418 540 443 531 _c }_e{_cl}_e}_d /t{392 0 27 0 368 702 _sc 183 702 _m 183 547 _l 368 547 _l 368 477 _l 183 477 _l 183 180 _l 183 135 189 106 201 94 _c 213 81 238 75 276 75 _c 368 75 _l 368 0 _l 276 0 _l 206 0 158 13 132 39 _c 106 65 93 112 93 180 _c 93 477 _l 27 477 _l 27 547 _l 93 547 _l 93 702 _l 183 702 _l _cl}_d /u{634 0 85 -13 543 560 _sc 85 216 _m 85 547 _l 175 547 _l 175 219 _l 175 167 185 129 205 103 _c 225 77 255 64 296 64 _c 344 64 383 79 411 110 _c 439 141 453 183 453 237 _c 453 547 _l 543 547 _l 543 0 _l 453 0 _l 453 84 _l 431 50 405 26 377 10 _c 348 -5 315 -13 277 -13 _c 214 -13 166 6 134 45 _c 101 83 85 140 85 216 _c 311 560 _m 311 560 _l _cl}_d /y{592 0 30 -207 562 547 _sc 322 -50 _m 296 -114 271 -157 247 -177 _c 223 -197 191 -207 151 -207 _c 79 -207 _l 79 -132 _l 132 -132 _l 156 -132 175 -126 189 -114 _c 203 -102 218 -75 235 -31 _c 251 9 _l 30 547 _l 125 547 _l 296 119 _l 467 547 _l 562 547 _l 322 -50 _l _cl}_d end readonly def /BuildGlyph {exch begin CharStrings exch 2 copy known not{pop /.notdef}if true 3 1 roll get exec end}_d /BuildChar { 1 index /Encoding get exch get 1 index /BuildGlyph get exec }_d FontName currentdict end definefont pop end %%EndProlog mpldict begin 13.5 175.5 translate 585 441 0 0 clipbox gsave 0 0 m 585 0 l 585 441 l 0 441 l cl 1.000 setgray fill grestore gsave 73.125 44.1 m 526.5 44.1 l 526.5 396.9 l 73.125 396.9 l cl 1.000 setgray fill grestore 1.000 setlinewidth 1 setlinejoin 2 setlinecap [] 0 setdash 0.165 0.431 0.651 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 260.951 m 74.0318 259.206 l 74.9385 255.178 l 75.8452 249.115 l 78.5655 229.084 l 80.379 217.258 l 83.0992 201.459 l 85.8195 187.099 l 89.4465 169.416 l 92.1668 157.129 l 94.887 145.838 l 96.7005 139.017 l 98.514 132.898 l 100.328 127.587 l 102.141 123.147 l 103.954 119.575 l 105.768 116.799 l 107.582 114.699 l 109.395 113.139 l 111.209 111.989 l 113.022 111.143 l 114.835 110.517 l 117.556 109.86 l 121.183 109.31 l 125.716 108.904 l 132.064 108.581 l 142.945 108.281 l 160.173 108.05 l 181.935 107.98 l 210.044 108.128 l 251.755 108.598 l 346.964 109.719 l 396.835 110.049 l 445.799 110.154 l 496.577 110.041 l 525.593 109.881 l 525.593 109.881 l stroke grestore 1.000 0.663 0.200 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 310.669 m 74.0318 309.203 l 74.9385 305.194 l 76.752 292.383 l 78.5655 279.311 l 80.379 267.624 l 83.0992 252.035 l 85.8195 237.917 l 88.5397 224.798 l 91.26 212.511 l 93.9802 201.063 l 96.7005 190.567 l 99.4207 181.19 l 101.234 175.648 l 103.048 170.722 l 104.861 166.432 l 106.675 162.773 l 108.488 159.714 l 110.302 157.203 l 112.115 155.172 l 113.929 153.55 l 115.742 152.264 l 117.556 151.25 l 119.369 150.451 l 122.09 149.557 l 124.81 148.922 l 128.437 148.336 l 132.971 147.85 l 140.225 147.346 l 152.919 146.745 l 180.122 145.719 l 218.205 144.507 l 261.729 143.35 l 315.227 142.161 l 385.047 140.848 l 490.23 139.116 l 525.593 138.564 l 525.593 138.564 l stroke grestore 1.000 0.333 0.333 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 358.233 m 74.0318 357.694 l 74.9385 355.284 l 75.8452 350.552 l 81.2858 315.664 l 84.006 300.653 l 86.7262 286.875 l 89.4465 274.021 l 92.1668 261.975 l 94.887 250.743 l 97.6072 240.412 l 100.328 231.119 l 102.141 225.57 l 103.954 220.579 l 105.768 216.168 l 107.582 212.339 l 109.395 209.077 l 111.209 206.345 l 113.022 204.095 l 114.835 202.267 l 116.649 200.8 l 118.463 199.634 l 120.276 198.714 l 122.09 197.991 l 124.81 197.192 l 127.53 196.639 l 131.157 196.156 l 135.691 195.8 l 142.038 195.534 l 153.826 195.307 l 191.002 194.926 l 332.456 193.717 l 503.831 192.48 l 525.593 192.337 l 525.593 192.337 l stroke grestore 0.500 setlinewidth 0 setlinecap [1 3] 0 setdash 0.000 setgray gsave 453.4 352.8 73.12 44.1 clipbox 73.125 44.1 m 73.125 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 396.9 o grestore /DejaVuSans findfont 12.000 scalefont setfont gsave 70.101562 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 163.8 44.1 m 163.8 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 163.8 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 163.8 396.9 o grestore gsave 153.393750 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 254.475 44.1 m 254.475 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 254.475 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 254.475 396.9 o grestore gsave 243.850000 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /two glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 345.15 44.1 m 345.15 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 345.15 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 345.15 396.9 o grestore gsave 334.548438 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /three glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 435.825 44.1 m 435.825 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 435.825 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 435.825 396.9 o grestore gsave 425.059375 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /four glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 526.5 44.1 m 526.5 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 396.9 o grestore gsave 515.898438 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /five glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore gsave 212.398438 14.350000 translate 0.000000 rotate 0.000000 0.000000 m /N glyphshow 8.976562 0.000000 m /u glyphshow 16.582031 0.000000 m /m glyphshow 28.271484 0.000000 m /b glyphshow 35.888672 0.000000 m /e glyphshow 43.271484 0.000000 m /r glyphshow 48.205078 0.000000 m /space glyphshow 52.019531 0.000000 m /o glyphshow 59.361328 0.000000 m /f glyphshow 63.585938 0.000000 m /space glyphshow 67.400391 0.000000 m /e glyphshow 74.783203 0.000000 m /p glyphshow 82.400391 0.000000 m /o glyphshow 89.742188 0.000000 m /c glyphshow 96.339844 0.000000 m /h glyphshow 103.945312 0.000000 m /s glyphshow 110.197266 0.000000 m /space glyphshow 114.011719 0.000000 m /o glyphshow 121.353516 0.000000 m /f glyphshow 125.578125 0.000000 m /space glyphshow 129.392578 0.000000 m /t glyphshow 134.097656 0.000000 m /r glyphshow 139.031250 0.000000 m /a glyphshow 146.384766 0.000000 m /i glyphshow 149.718750 0.000000 m /n glyphshow 157.324219 0.000000 m /i glyphshow 160.658203 0.000000 m /n glyphshow 168.263672 0.000000 m /g glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 44.1 m 526.5 44.1 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 44.1 o grestore gsave 44.125000 39.100000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.937500 moveto /one glyphshow 7.634766 0.937500 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.875000 moveto /hyphen glyphshow 18.300586 7.875000 moveto /five glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 114.66 m 526.5 114.66 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 114.66 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 114.66 o grestore gsave 44.125000 109.660000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.937500 moveto /one glyphshow 7.634766 0.937500 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.875000 moveto /hyphen glyphshow 18.300586 7.875000 moveto /four glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 185.22 m 526.5 185.22 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 185.22 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 185.22 o grestore gsave 44.125000 180.220000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.828125 moveto /one glyphshow 7.634766 0.828125 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.765625 moveto /hyphen glyphshow 18.300586 7.765625 moveto /three glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 255.78 m 526.5 255.78 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 255.78 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 255.78 o grestore gsave 44.125000 250.780000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.828125 moveto /one glyphshow 7.634766 0.828125 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.765625 moveto /hyphen glyphshow 18.300586 7.765625 moveto /two glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 326.34 m 526.5 326.34 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 326.34 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 326.34 o grestore gsave 44.125000 321.340000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.937500 moveto /one glyphshow 7.634766 0.937500 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.875000 moveto /hyphen glyphshow 18.300586 7.875000 moveto /one glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 396.9 m 526.5 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 396.9 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 396.9 o grestore gsave 47.125000 391.900000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.828125 moveto /one glyphshow 7.634766 0.828125 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.765625 moveto /zero glyphshow grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 65.3407 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 65.3407 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 77.7657 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 77.7657 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 86.5814 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 86.5814 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 93.4193 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 93.4193 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 99.0064 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 99.0064 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 103.73 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 103.73 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 107.822 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 107.822 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 111.431 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 111.431 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 135.901 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 135.901 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 148.326 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 148.326 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 157.141 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 157.141 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 163.979 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 163.979 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 169.566 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 169.566 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 174.29 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 174.29 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 178.382 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 178.382 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 181.991 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 181.991 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 206.461 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 206.461 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 218.886 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 218.886 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 227.701 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 227.701 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 234.539 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 234.539 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 240.126 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 240.126 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 244.85 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 244.85 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 248.942 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 248.942 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 252.551 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 252.551 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 277.021 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 277.021 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 289.446 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 289.446 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 298.261 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 298.261 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 305.099 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 305.099 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 310.686 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 310.686 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 315.41 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 315.41 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 319.502 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 319.502 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 323.111 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 323.111 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 347.581 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 347.581 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 360.006 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 360.006 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 368.821 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 368.821 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 375.659 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 375.659 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 381.246 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 381.246 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 385.97 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 385.97 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 390.062 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 390.062 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 393.671 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 393.671 o grestore 1.000 setlinewidth gsave 73.125 396.9 m 526.5 396.9 l stroke grestore gsave 526.5 44.1 m 526.5 396.9 l stroke grestore gsave 73.125 44.1 m 526.5 44.1 l stroke grestore gsave 73.125 44.1 m 73.125 396.9 l stroke grestore /DejaVuSans findfont 14.400 scalefont setfont gsave 176.500000 401.900000 translate 0.000000 rotate 0.000000 0.000000 m /S glyphshow 9.134674 0.000000 m /p glyphshow 18.269348 0.000000 m /e glyphshow 27.122955 0.000000 m /e glyphshow 35.976562 0.000000 m /d glyphshow 45.111237 0.000000 m /space glyphshow 49.685593 0.000000 m /o glyphshow 58.490005 0.000000 m /f glyphshow 63.556229 0.000000 m /space glyphshow 68.130585 0.000000 m /l glyphshow 72.128754 0.000000 m /e glyphshow 80.982361 0.000000 m /a glyphshow 89.800827 0.000000 m /r glyphshow 95.467285 0.000000 m /n glyphshow 104.587906 0.000000 m /i glyphshow 108.586075 0.000000 m /n glyphshow 117.706696 0.000000 m /g glyphshow 126.841370 0.000000 m /colon glyphshow 131.689774 0.000000 m /space glyphshow 136.264130 0.000000 m /three glyphshow 145.419876 0.000000 m /space glyphshow 149.994232 0.000000 m /h glyphshow 159.114853 0.000000 m /i glyphshow 163.113022 0.000000 m /d glyphshow 172.247696 0.000000 m /d glyphshow 181.382370 0.000000 m /e glyphshow 190.235977 0.000000 m /n glyphshow 199.356598 0.000000 m /space glyphshow 203.930954 0.000000 m /l glyphshow 207.929123 0.000000 m /a glyphshow 216.747589 0.000000 m /y glyphshow 225.263916 0.000000 m /e glyphshow 234.117523 0.000000 m /r glyphshow 240.033981 0.000000 m /s glyphshow grestore gsave 363.21 323.139 m 519.3 323.139 l 519.3 389.7 l 363.21 389.7 l 363.21 323.139 l cl gsave 1.000 setgray fill grestore stroke grestore 2 setlinecap 0.165 0.431 0.651 setrgbcolor gsave 373.29 378.339 m 393.45 378.339 l stroke grestore 0.000 setgray gsave 409.290000 373.299375 translate 0.000000 rotate 0.000000 0.000000 m /H glyphshow 10.821075 0.000000 m /i glyphshow 14.819244 0.000000 m /d glyphshow 23.953918 0.000000 m /d glyphshow 33.088593 0.000000 m /e glyphshow 41.942200 0.000000 m /n glyphshow 51.062820 0.000000 m /space glyphshow 55.637177 0.000000 m /l glyphshow 59.635345 0.000000 m /a glyphshow 68.453812 0.000000 m /y glyphshow 76.970139 0.000000 m /e glyphshow 85.823746 0.000000 m /r glyphshow 91.740204 0.000000 m /space glyphshow 96.314560 0.000000 m /one glyphshow grestore 1.000 0.663 0.200 setrgbcolor gsave 373.29 357.593 m 393.45 357.593 l stroke grestore 0.000 setgray gsave 409.290000 352.552500 translate 0.000000 rotate 0.000000 0.000000 m /H glyphshow 10.821075 0.000000 m /i glyphshow 14.819244 0.000000 m /d glyphshow 23.953918 0.000000 m /d glyphshow 33.088593 0.000000 m /e glyphshow 41.942200 0.000000 m /n glyphshow 51.062820 0.000000 m /space glyphshow 55.637177 0.000000 m /l glyphshow 59.635345 0.000000 m /a glyphshow 68.453812 0.000000 m /y glyphshow 76.970139 0.000000 m /e glyphshow 85.823746 0.000000 m /r glyphshow 91.740204 0.000000 m /space glyphshow 96.314560 0.000000 m /two glyphshow grestore 1.000 0.333 0.333 setrgbcolor gsave 373.29 336.846 m 393.45 336.846 l stroke grestore 0.000 setgray gsave 409.290000 331.805625 translate 0.000000 rotate 0.000000 0.000000 m /H glyphshow 10.821075 0.000000 m /i glyphshow 14.819244 0.000000 m /d glyphshow 23.953918 0.000000 m /d glyphshow 33.088593 0.000000 m /e glyphshow 41.942200 0.000000 m /n glyphshow 51.062820 0.000000 m /space glyphshow 55.637177 0.000000 m /l glyphshow 59.635345 0.000000 m /a glyphshow 68.453812 0.000000 m /y glyphshow 76.970139 0.000000 m /e glyphshow 85.823746 0.000000 m /r glyphshow 91.740204 0.000000 m /space glyphshow 96.314560 0.000000 m /three glyphshow grestore end showpage ```
/content/code_sandbox/images/training_speed_3_layers.eps
postscript
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
20,214
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{calc,positioning} \usepackage{pgfplots} \usepackage[default]{cjkfonts} \input{../westernfonts} \input{../plots} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel={\normalsize $x$}, axis lines=left, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, legend style={font=\tiny}, xtick distance=1, ytick distance=1, xtick={0}, ytick={1}, % minor tick num=1, legend entries={$w=8,b=-4$\\$w=8,b=4$\\$w=3,b=4$\\$w=105,b=4$\\}, legend style={ at={(0.8,0.5)}, anchor=west }, title={}, declare function={ sigma(\z) = 1/(1 + exp(-\z)); f(\x,\w,\b) = sigma(\w * \x + \b); } ] \addplot[ gray, thick, dotted, domain=-5:5, samples=101 ] { f(x, 8, -4) }; \addplot[ orange!40!gray, domain=-5:5, samples=101 ] { f(x, 8, 4) }; \addplot[ orange!80, domain=-5:5, samples=101 ] { f(x, 3, 4) }; \addplot[ orange, thick, domain=-5:5, samples=401 ] { f(x, 105, 4) }; \end{axis} \end{tikzpicture}% \end{document} ```
/content/code_sandbox/images/create_step_function.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
472
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \node (x1) at (-6, 1.2) {$x_1$}; \node (x2) at (-6, -1.2) {$x_2$}; \node (pl1) at (-4, 0) [neuron] {}; \node (pm1) at (-2, 1.2) [neuron] {}; \node (pm2) at (-2, -1.2) [neuron] {}; \node (pm3) at (-2, -2.5) [neuron] {}; \node (pr1) at (0, 0) [neuron] {}; \node (sum) at (2.5, 0) {\ sum: $x_1 \oplus x_2$}; \node (carrybit) at (2.5, -2.5) {\ carry bit: $x_1x_2$}; \draw [->] (-5.75, 1.2) to (pl1); \draw [->] (-5.75, -1.2) to (pl1); \draw [->] (-5.75, 1.2) to (pm1); \draw [->] (-5.75, -1.2) to (pm2); \draw [->] (pl1) to (pm1); \draw [->] (pl1) to (pm2); \draw [->] (pl1) to node [below,xshift=-2mm] {$-4$} (pm3); \draw [->] (pm1) to (pr1); \draw [->] (pm2) to (pr1); \draw [->] (pr1) to (sum); \draw [->] (pm3) to (carrybit); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz5.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
496
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \node (x1) at (-6, 1.2) {$x_1$}; \node (x2) at (-6, -1.2) {$x_2$}; \node (pl1) at (-4, 0) [neuron] {}; \node (pm1) at (-2, 1.2) [neuron] {}; \node (pm2) at (-2, -1.2) [neuron] {}; \node (pm3) at (-2, -2.5) [neuron] {}; \node (pr1) at (0, 0) [neuron] {}; \node (sum) at (2.5, 0) {\ sum: $x_1 \oplus x_2$}; \node (carrybit) at (2.5, -2.5) {\ carry bit: $x_1x_2$}; \draw [->] (-5.75, 1.2) to (pl1); \draw [->] (-5.75, -1.2) to (pl1); \draw [->] (-5.75, 1.2) to (pm1); \draw [->] (-5.75, -1.2) to (pm2); \draw [->] (pl1) to (pm1); \draw [->] (pl1) to (pm2); \draw [->] (pl1.-60) to (pm3); \draw [->] (pl1.-70) to (pm3.180); \draw [->] (pm1) to (pr1); \draw [->] (pm2) to (pr1); \draw [->] (pr1) to (sum); \draw [->] (pm3) to (carrybit); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz4.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
503
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[ inputlayer/.style={rectangle,draw,fill=white,inner sep=0pt,minimum size=30mm}, hiddenlayer/.style={rectangle,draw,fill=white,inner sep=0pt,minimum size=22mm}, poolinglayer/.style={rectangle,draw,fill=white,inner sep=0pt,minimum size=15mm}, neuron/.style={circle,draw,inner sep=0pt,minimum size=5mm} ] \node (input) [inputlayer,anchor=south west] at (0,0) {}; \node (hidden0) [hiddenlayer,anchor=south west] at (4,0) {}; \node (hidden1) [hiddenlayer,anchor=south west,xshift=6mm,yshift=6mm] at (hidden0.south west) {}; \node (hidden2) [hiddenlayer,anchor=south west,xshift=1mm,yshift=1mm] at (hidden1.south west) {}; \node (hidden3) [hiddenlayer,anchor=south west,xshift=1mm,yshift=1mm] at (hidden2.south west) {}; \draw[dashed] (hidden0.north west) -- (hidden1.north west); \draw[dashed] (hidden0.south west) -- (hidden1.south west); \draw[dashed] (hidden0.south east) -- (hidden1.south east); \foreach \x in {0,1,2,3} \node (pooling\x) [poolinglayer,anchor=west,right=1.8 of hidden\x] {}; \draw[dashed] (pooling0.north west) -- (pooling1.north west); \draw[dashed] (pooling0.south west) -- (pooling1.south west); \draw[dashed] (pooling0.south east) -- (pooling1.south east); \foreach \x in {0,...,7} \node(s\x) [neuron] at (12, 0.75 * \x - 1.125) {}; \foreach \x in {0,...,4} \node(o\x) [neuron] at (14.2, 0.75 * \x + 0.375) {}; \node [above] at (input.north) {$28 \times 28$}; \node [above,xshift=-6mm] at (hidden3.north) { \begin{tabular}{c} convolution layer\\ $20 \times 24 \times 24$ \end{tabular} }; \node [above,xshift=-5mm] at (pooling2.north) { \begin{tabular}{c} pooling layer\\ $20 \times 12 \times 12$ \end{tabular} }; \node [above] at (s7.north) { \begin{tabular}{c} 100 sigmoid\\ neurons \end{tabular} }; \node [above] at (o4.north) { \begin{tabular}{c} 10 neurons\\ output layer\\ (softmax) \end{tabular} }; \node [below,rotate=-90,xshift=5mm,yshift=1.75mm] at (s0.south) {$\ldots$}; \node [below,rotate=-90,xshift=5mm,yshift=1.75mm] at (o0.south) {$\ldots$}; \coordinate(a0) at (input.east); \draw[->] (a0) -- ++(1.4,0); \draw[->] (a0)++(4,0) -- ++(1.4,0); \draw[->] (a0)++(7.3,0) -- ++(1.45,0); \draw[->] (a0)++(9.25,0) -- ++(1.65,0); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/simple_conv.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
981
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{calc,positioning} \usepackage{pgfplots} \usepackage{cjkfonts} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node (l0) [neuron] {$x$}; \node (m0) [neuron,right=of l0,yshift=-1.5cm] {}; \node (m1) [neuron,right=of l0,yshift=1.5cm] {}; \node (r0) [neuron,right=of m0,yshift=1.5cm] {}; \draw[->] (r0) -- ++(1,0); \draw[->] (l0) to (m0); \draw[->] (l0) to (m1); \draw[->] (m0) to (r0); \draw[->] (m1) to (r0); \node(b) [blue,above] at (m1.north) {$s = 0.40$}; \end{scope} \begin{scope}[xshift=6cm] \begin{axis}[ width=5.6cm, height=5.6cm, xlabel={\normalsize $x$}, axis lines=left, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, xtick distance=1, ytick distance=1, xmax=1.1, ymax=1.1, title={} ] \addplot[ orange, thick, domain=0:1, samples=101 ] { 1/(1 + exp(-(1000 * x + (-0.40 * 1000)))) }; \end{axis} \end{scope} \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/step_parameterization.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
493
```postscript %!PS-Adobe-3.0 EPSF-3.0 %%Title: /home/zhanggyb/regularized2.eps %%Creator: matplotlib version 1.3.1, path_to_url %%CreationDate: Wed Feb 17 11:25:13 2016 %%Orientation: portrait %%BoundingBox: 13 175 598 616 %%EndComments %%BeginProlog /mpldict 8 dict def mpldict begin /m { moveto } bind def /l { lineto } bind def /r { rlineto } bind def /c { curveto } bind def /cl { closepath } bind def /box { m 1 index 0 r 0 exch r neg 0 r cl } bind def /clipbox { box clip newpath } bind def %!PS-Adobe-3.0 Resource-Font %%Title: DejaVu Sans %%Creator: Converted from TrueType to type 3 by PPR 25 dict begin /_d{bind def}bind def /_m{moveto}_d /_l{lineto}_d /_cl{closepath eofill}_d /_c{curveto}_d /_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d /_e{exec}_d /FontName /DejaVuSans def /PaintType 0 def /FontMatrix[.001 0 0 .001 0 0]def /FontBBox[-1021 -415 1681 1167]def /FontType 3 def /Encoding [ /space /percent /parenleft /parenright /period /zero /two /three /four /five /six /seven /eight /A /E /a /c /d /e /h /n /o /p /r /s /t /u /y ] def /FontInfo 10 dict dup begin /FamilyName (DejaVu Sans) def /FullName (DejaVu Sans) def /Weight (Book) def /Version (Version 2.34) def /ItalicAngle 0.0 def /isFixedPitch false def /UnderlinePosition -130 def /UnderlineThickness 90 def end readonly def /CharStrings 28 dict dup begin /space{318 0 0 0 0 0 _sc }_d /percent{{950 0 55 -13 895 742 _sc 727 321 _m 699 321 676 309 660 285 _c 644 261 636 227 636 184 _c 636 142 644 108 660 84 _c 676 60 699 48 727 48 _c 755 48 777 60 793 84 _c 809 108 817 142 817 184 _c 817 226 809 260 793 284 _c 777 308 755 321 727 321 _c 727 383 _m 778 383 819 365 849 329 _c 879 293 895 244 895 184 _c 895 123 879 75 849 40 _c 819 4 778 -13 727 -13 _c }_e{675 -13 633 4 603 40 _c 573 75 558 123 558 184 _c 558 245 573 293 603 329 _c 633 365 675 383 727 383 _c 223 680 _m 195 680 173 667 157 643 _c 141 619 133 586 133 544 _c 133 500 141 467 157 443 _c 173 419 195 407 223 407 _c 251 407 274 419 290 443 _c 306 467 314 500 314 544 _c 314 586 305 619 289 643 _c 273 667 251 680 223 680 _c 664 742 _m 742 742 _l 286 -13 _l }_e{208 -13 _l 664 742 _l 223 742 _m 274 742 315 724 346 688 _c 376 652 392 604 392 544 _c 392 482 376 434 346 398 _c 316 362 275 345 223 345 _c 171 345 130 362 100 398 _c 70 434 55 482 55 544 _c 55 604 70 652 100 688 _c 130 724 171 742 223 742 _c _cl}_e}_d /parenleft{390 0 86 -131 310 759 _sc 310 759 _m 266 683 234 609 213 536 _c 191 463 181 389 181 314 _c 181 238 191 164 213 91 _c 234 17 266 -56 310 -131 _c 232 -131 _l 183 -54 146 20 122 94 _c 98 168 86 241 86 314 _c 86 386 98 459 122 533 _c 146 607 182 682 232 759 _c 310 759 _l _cl}_d /parenright{390 0 80 -131 304 759 _sc 80 759 _m 158 759 _l 206 682 243 607 267 533 _c 291 459 304 386 304 314 _c 304 241 291 168 267 94 _c 243 20 206 -54 158 -131 _c 80 -131 _l 123 -56 155 17 177 91 _c 198 164 209 238 209 314 _c 209 389 198 463 177 536 _c 155 609 123 683 80 759 _c _cl}_d /period{318 0 107 0 210 124 _sc 107 124 _m 210 124 _l 210 0 _l 107 0 _l 107 124 _l _cl}_d /zero{636 0 66 -13 570 742 _sc 318 664 _m 267 664 229 639 203 589 _c 177 539 165 464 165 364 _c 165 264 177 189 203 139 _c 229 89 267 64 318 64 _c 369 64 407 89 433 139 _c 458 189 471 264 471 364 _c 471 464 458 539 433 589 _c 407 639 369 664 318 664 _c 318 742 _m 399 742 461 709 505 645 _c 548 580 570 486 570 364 _c 570 241 548 147 505 83 _c 461 19 399 -13 318 -13 _c 236 -13 173 19 130 83 _c 87 147 66 241 66 364 _c 66 486 87 580 130 645 _c 173 709 236 742 318 742 _c _cl}_d /two{{636 0 73 0 536 742 _sc 192 83 _m 536 83 _l 536 0 _l 73 0 _l 73 83 _l 110 121 161 173 226 239 _c 290 304 331 346 348 365 _c 380 400 402 430 414 455 _c 426 479 433 504 433 528 _c 433 566 419 598 392 622 _c 365 646 330 659 286 659 _c 255 659 222 653 188 643 _c 154 632 117 616 78 594 _c 78 694 _l 118 710 155 722 189 730 _c 223 738 255 742 284 742 _c }_e{359 742 419 723 464 685 _c 509 647 532 597 532 534 _c 532 504 526 475 515 449 _c 504 422 484 390 454 354 _c 446 344 420 317 376 272 _c 332 227 271 164 192 83 _c _cl}_e}_d /three{{636 0 76 -13 556 742 _sc 406 393 _m 453 383 490 362 516 330 _c 542 298 556 258 556 212 _c 556 140 531 84 482 45 _c 432 6 362 -13 271 -13 _c 240 -13 208 -10 176 -4 _c 144 1 110 10 76 22 _c 76 117 _l 103 101 133 89 166 81 _c 198 73 232 69 268 69 _c 330 69 377 81 409 105 _c 441 129 458 165 458 212 _c 458 254 443 288 413 312 _c 383 336 341 349 287 349 _c }_e{202 349 _l 202 430 _l 291 430 _l 339 430 376 439 402 459 _c 428 478 441 506 441 543 _c 441 580 427 609 401 629 _c 374 649 336 659 287 659 _c 260 659 231 656 200 650 _c 169 644 135 635 98 623 _c 98 711 _l 135 721 170 729 203 734 _c 235 739 266 742 296 742 _c 370 742 429 725 473 691 _c 517 657 539 611 539 553 _c 539 513 527 479 504 451 _c 481 423 448 403 406 393 _c _cl}_e}_d /four{636 0 49 0 580 729 _sc 378 643 _m 129 254 _l 378 254 _l 378 643 _l 352 729 _m 476 729 _l 476 254 _l 580 254 _l 580 172 _l 476 172 _l 476 0 _l 378 0 _l 378 172 _l 49 172 _l 49 267 _l 352 729 _l _cl}_d /five{{636 0 77 -13 549 729 _sc 108 729 _m 495 729 _l 495 646 _l 198 646 _l 198 467 _l 212 472 227 476 241 478 _c 255 480 270 482 284 482 _c 365 482 429 459 477 415 _c 525 370 549 310 549 234 _c 549 155 524 94 475 51 _c 426 8 357 -13 269 -13 _c 238 -13 207 -10 175 -6 _c 143 -1 111 6 77 17 _c 77 116 _l 106 100 136 88 168 80 _c 199 72 232 69 267 69 _c }_e{323 69 368 83 401 113 _c 433 143 450 183 450 234 _c 450 284 433 324 401 354 _c 368 384 323 399 267 399 _c 241 399 214 396 188 390 _c 162 384 135 375 108 363 _c 108 729 _l _cl}_e}_d /six{{636 0 70 -13 573 742 _sc 330 404 _m 286 404 251 388 225 358 _c 199 328 186 286 186 234 _c 186 181 199 139 225 109 _c 251 79 286 64 330 64 _c 374 64 409 79 435 109 _c 461 139 474 181 474 234 _c 474 286 461 328 435 358 _c 409 388 374 404 330 404 _c 526 713 _m 526 623 _l 501 635 476 644 451 650 _c 425 656 400 659 376 659 _c 310 659 260 637 226 593 _c }_e{192 549 172 482 168 394 _c 187 422 211 444 240 459 _c 269 474 301 482 336 482 _c 409 482 467 459 509 415 _c 551 371 573 310 573 234 _c 573 159 550 99 506 54 _c 462 9 403 -13 330 -13 _c 246 -13 181 19 137 83 _c 92 147 70 241 70 364 _c 70 479 97 571 152 639 _c 206 707 280 742 372 742 _c 396 742 421 739 447 735 _c 472 730 498 723 526 713 _c _cl}_e}_d /seven{636 0 82 0 551 729 _sc 82 729 _m 551 729 _l 551 687 _l 286 0 _l 183 0 _l 432 646 _l 82 646 _l 82 729 _l _cl}_d /eight{{636 0 68 -13 568 742 _sc 318 346 _m 271 346 234 333 207 308 _c 180 283 167 249 167 205 _c 167 161 180 126 207 101 _c 234 76 271 64 318 64 _c 364 64 401 76 428 102 _c 455 127 469 161 469 205 _c 469 249 455 283 429 308 _c 402 333 365 346 318 346 _c 219 388 _m 177 398 144 418 120 447 _c 96 476 85 511 85 553 _c 85 611 105 657 147 691 _c 188 725 245 742 318 742 _c }_e{390 742 447 725 489 691 _c 530 657 551 611 551 553 _c 551 511 539 476 515 447 _c 491 418 459 398 417 388 _c 464 377 501 355 528 323 _c 554 291 568 251 568 205 _c 568 134 546 80 503 43 _c 459 5 398 -13 318 -13 _c 237 -13 175 5 132 43 _c 89 80 68 134 68 205 _c 68 251 81 291 108 323 _c 134 355 171 377 219 388 _c 183 544 _m 183 506 194 476 218 455 _c }_e{242 434 275 424 318 424 _c 360 424 393 434 417 455 _c 441 476 453 506 453 544 _c 453 582 441 611 417 632 _c 393 653 360 664 318 664 _c 275 664 242 653 218 632 _c 194 611 183 582 183 544 _c _cl}_e}_d /A{684 0 8 0 676 729 _sc 342 632 _m 208 269 _l 476 269 _l 342 632 _l 286 729 _m 398 729 _l 676 0 _l 573 0 _l 507 187 _l 178 187 _l 112 0 _l 8 0 _l 286 729 _l _cl}_d /E{632 0 98 0 568 729 _sc 98 729 _m 559 729 _l 559 646 _l 197 646 _l 197 430 _l 544 430 _l 544 347 _l 197 347 _l 197 83 _l 568 83 _l 568 0 _l 98 0 _l 98 729 _l _cl}_d /a{{613 0 60 -13 522 560 _sc 343 275 _m 270 275 220 266 192 250 _c 164 233 150 205 150 165 _c 150 133 160 107 181 89 _c 202 70 231 61 267 61 _c 317 61 357 78 387 114 _c 417 149 432 196 432 255 _c 432 275 _l 343 275 _l 522 312 _m 522 0 _l 432 0 _l 432 83 _l 411 49 385 25 355 10 _c 325 -5 287 -13 243 -13 _c 187 -13 142 2 109 33 _c 76 64 60 106 60 159 _c }_e{60 220 80 266 122 298 _c 163 329 224 345 306 345 _c 432 345 _l 432 354 _l 432 395 418 427 391 450 _c 364 472 326 484 277 484 _c 245 484 215 480 185 472 _c 155 464 127 453 100 439 _c 100 522 _l 132 534 164 544 195 550 _c 226 556 256 560 286 560 _c 365 560 424 539 463 498 _c 502 457 522 395 522 312 _c _cl}_e}_d /c{{550 0 55 -13 488 560 _sc 488 526 _m 488 442 _l 462 456 437 466 411 473 _c 385 480 360 484 334 484 _c 276 484 230 465 198 428 _c 166 391 150 339 150 273 _c 150 206 166 154 198 117 _c 230 80 276 62 334 62 _c 360 62 385 65 411 72 _c 437 79 462 90 488 104 _c 488 21 _l 462 9 436 0 410 -5 _c 383 -10 354 -13 324 -13 _c 242 -13 176 12 128 64 _c }_e{79 115 55 185 55 273 _c 55 362 79 432 128 483 _c 177 534 244 560 330 560 _c 358 560 385 557 411 551 _c 437 545 463 537 488 526 _c _cl}_e}_d /d{{635 0 55 -13 544 760 _sc 454 464 _m 454 760 _l 544 760 _l 544 0 _l 454 0 _l 454 82 _l 435 49 411 25 382 10 _c 353 -5 319 -13 279 -13 _c 213 -13 159 13 117 65 _c 75 117 55 187 55 273 _c 55 359 75 428 117 481 _c 159 533 213 560 279 560 _c 319 560 353 552 382 536 _c 411 520 435 496 454 464 _c 148 273 _m 148 207 161 155 188 117 _c 215 79 253 61 301 61 _c }_e{348 61 385 79 413 117 _c 440 155 454 207 454 273 _c 454 339 440 390 413 428 _c 385 466 348 485 301 485 _c 253 485 215 466 188 428 _c 161 390 148 339 148 273 _c _cl}_e}_d /e{{615 0 55 -13 562 560 _sc 562 296 _m 562 252 _l 149 252 _l 153 190 171 142 205 110 _c 238 78 284 62 344 62 _c 378 62 412 66 444 74 _c 476 82 509 95 541 113 _c 541 28 _l 509 14 476 3 442 -3 _c 408 -9 373 -13 339 -13 _c 251 -13 182 12 131 62 _c 80 112 55 181 55 268 _c 55 357 79 428 127 481 _c 175 533 241 560 323 560 _c 397 560 455 536 498 489 _c }_e{540 441 562 377 562 296 _c 472 322 _m 471 371 457 410 431 440 _c 404 469 368 484 324 484 _c 274 484 234 469 204 441 _c 174 413 156 373 152 322 _c 472 322 _l _cl}_e}_d /h{634 0 91 0 549 760 _sc 549 330 _m 549 0 _l 459 0 _l 459 327 _l 459 379 448 417 428 443 _c 408 469 378 482 338 482 _c 289 482 251 466 223 435 _c 195 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 760 _l 181 760 _l 181 462 _l 202 494 227 519 257 535 _c 286 551 320 560 358 560 _c 420 560 468 540 500 501 _c 532 462 549 405 549 330 _c _cl}_d /n{634 0 91 0 549 560 _sc 549 330 _m 549 0 _l 459 0 _l 459 327 _l 459 379 448 417 428 443 _c 408 469 378 482 338 482 _c 289 482 251 466 223 435 _c 195 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 202 494 227 519 257 535 _c 286 551 320 560 358 560 _c 420 560 468 540 500 501 _c 532 462 549 405 549 330 _c _cl}_d /o{612 0 55 -13 557 560 _sc 306 484 _m 258 484 220 465 192 427 _c 164 389 150 338 150 273 _c 150 207 163 156 191 118 _c 219 80 257 62 306 62 _c 354 62 392 80 420 118 _c 448 156 462 207 462 273 _c 462 337 448 389 420 427 _c 392 465 354 484 306 484 _c 306 560 _m 384 560 445 534 490 484 _c 534 433 557 363 557 273 _c 557 183 534 113 490 63 _c 445 12 384 -13 306 -13 _c 227 -13 165 12 121 63 _c 77 113 55 183 55 273 _c 55 363 77 433 121 484 _c 165 534 227 560 306 560 _c _cl}_d /p{{635 0 91 -207 580 560 _sc 181 82 _m 181 -207 _l 91 -207 _l 91 547 _l 181 547 _l 181 464 _l 199 496 223 520 252 536 _c 281 552 316 560 356 560 _c 422 560 476 533 518 481 _c 559 428 580 359 580 273 _c 580 187 559 117 518 65 _c 476 13 422 -13 356 -13 _c 316 -13 281 -5 252 10 _c 223 25 199 49 181 82 _c 487 273 _m 487 339 473 390 446 428 _c 418 466 381 485 334 485 _c }_e{286 485 249 466 222 428 _c 194 390 181 339 181 273 _c 181 207 194 155 222 117 _c 249 79 286 61 334 61 _c 381 61 418 79 446 117 _c 473 155 487 207 487 273 _c _cl}_e}_d /r{411 0 91 0 411 560 _sc 411 463 _m 401 469 390 473 378 476 _c 366 478 353 480 339 480 _c 288 480 249 463 222 430 _c 194 397 181 350 181 288 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 199 495 224 520 254 536 _c 284 552 321 560 365 560 _c 371 560 378 559 386 559 _c 393 558 401 557 411 555 _c 411 463 _l _cl}_d /s{{521 0 54 -13 472 560 _sc 443 531 _m 443 446 _l 417 458 391 468 364 475 _c 336 481 308 485 279 485 _c 234 485 200 478 178 464 _c 156 450 145 430 145 403 _c 145 382 153 366 169 354 _c 185 342 217 330 265 320 _c 296 313 _l 360 299 405 279 432 255 _c 458 230 472 195 472 151 _c 472 100 452 60 412 31 _c 372 1 316 -13 246 -13 _c 216 -13 186 -10 154 -5 _c }_e{122 0 89 8 54 20 _c 54 113 _l 87 95 120 82 152 74 _c 184 65 216 61 248 61 _c 290 61 323 68 346 82 _c 368 96 380 117 380 144 _c 380 168 371 187 355 200 _c 339 213 303 226 247 238 _c 216 245 _l 160 257 119 275 95 299 _c 70 323 58 356 58 399 _c 58 450 76 490 112 518 _c 148 546 200 560 268 560 _c 301 560 332 557 362 552 _c 391 547 418 540 443 531 _c }_e{_cl}_e}_d /t{392 0 27 0 368 702 _sc 183 702 _m 183 547 _l 368 547 _l 368 477 _l 183 477 _l 183 180 _l 183 135 189 106 201 94 _c 213 81 238 75 276 75 _c 368 75 _l 368 0 _l 276 0 _l 206 0 158 13 132 39 _c 106 65 93 112 93 180 _c 93 477 _l 27 477 _l 27 547 _l 93 547 _l 93 702 _l 183 702 _l _cl}_d /u{634 0 85 -13 543 560 _sc 85 216 _m 85 547 _l 175 547 _l 175 219 _l 175 167 185 129 205 103 _c 225 77 255 64 296 64 _c 344 64 383 79 411 110 _c 439 141 453 183 453 237 _c 453 547 _l 543 547 _l 543 0 _l 453 0 _l 453 84 _l 431 50 405 26 377 10 _c 348 -5 315 -13 277 -13 _c 214 -13 166 6 134 45 _c 101 83 85 140 85 216 _c 311 560 _m 311 560 _l _cl}_d /y{592 0 30 -207 562 547 _sc 322 -50 _m 296 -114 271 -157 247 -177 _c 223 -197 191 -207 151 -207 _c 79 -207 _l 79 -132 _l 132 -132 _l 156 -132 175 -126 189 -114 _c 203 -102 218 -75 235 -31 _c 251 9 _l 30 547 _l 125 547 _l 296 119 _l 467 547 _l 562 547 _l 322 -50 _l _cl}_d end readonly def /BuildGlyph {exch begin CharStrings exch 2 copy known not{pop /.notdef}if true 3 1 roll get exec end}_d /BuildChar { 1 index /Encoding get exch get 1 index /BuildGlyph get exec }_d FontName currentdict end definefont pop end %%EndProlog mpldict begin 13.5 175.5 translate 585 441 0 0 clipbox gsave 0 0 m 585 0 l 585 441 l 0 441 l cl 1.000 setgray fill grestore gsave 73.125 44.1 m 526.5 44.1 l 526.5 396.9 l 73.125 396.9 l cl 1.000 setgray fill grestore 1.000 setlinewidth 1 setlinejoin 2 setlinecap [] 0 setdash 0.165 0.431 0.651 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 69.3 m 75.3919 81.9 l 77.6588 91.98 l 79.9256 79.38 l 82.1925 79.38 l 84.4594 91.98 l 86.7263 79.38 l 88.9931 79.38 l 91.26 64.26 l 93.5269 112.14 l 95.7938 79.38 l 98.0606 109.62 l 100.328 79.38 l 102.594 117.18 l 104.861 109.62 l 107.128 86.94 l 109.395 124.74 l 111.662 139.86 l 113.929 137.34 l 116.196 99.54 l 118.463 154.98 l 120.729 157.5 l 122.996 97.02 l 125.263 107.1 l 127.53 144.9 l 129.797 149.94 l 132.064 127.26 l 134.331 149.94 l 136.598 147.42 l 138.864 124.74 l 141.131 127.26 l 143.398 117.18 l 145.665 129.78 l 147.932 127.26 l 150.199 162.54 l 152.466 160.02 l 154.733 162.54 l 156.999 149.94 l 159.266 185.22 l 161.533 187.74 l 163.8 154.98 l 166.067 175.14 l 168.334 134.82 l 170.601 119.7 l 172.868 175.14 l 175.134 127.26 l 177.401 137.34 l 179.668 160.02 l 181.935 119.7 l 184.202 160.02 l 186.469 144.9 l 188.736 170.1 l 191.003 142.38 l 193.269 167.58 l 197.803 187.74 l 200.07 172.62 l 202.337 162.54 l 204.604 190.26 l 206.871 180.18 l 209.138 185.22 l 211.404 177.66 l 213.671 177.66 l 215.938 144.9 l 218.205 170.1 l 220.472 187.74 l 222.739 190.26 l 225.006 170.1 l 227.273 160.02 l 229.539 212.94 l 231.806 170.1 l 234.073 157.5 l 236.34 210.42 l 238.607 187.74 l 240.874 152.46 l 243.141 207.9 l 245.408 157.5 l 247.674 172.62 l 249.941 217.98 l 252.208 205.38 l 254.475 207.9 l 256.742 200.34 l 259.009 175.14 l 261.276 205.38 l 263.543 190.26 l 265.809 197.82 l 268.076 185.22 l 270.343 200.34 l 272.61 202.86 l 274.877 210.42 l 277.144 190.26 l 279.411 182.7 l 281.678 187.74 l 283.944 220.5 l 286.211 273.42 l 288.478 175.14 l 290.745 233.1 l 293.012 238.14 l 295.279 223.02 l 297.546 175.14 l 299.813 217.98 l 302.079 233.1 l 304.346 228.06 l 306.613 243.18 l 308.88 230.58 l 311.147 238.14 l 313.414 233.1 l 315.681 225.54 l 317.948 223.02 l 320.214 260.82 l 322.481 215.46 l 324.748 212.94 l 327.015 253.26 l 329.282 205.38 l 331.549 223.02 l 333.816 291.06 l 336.083 275.94 l 338.349 265.86 l 340.616 253.26 l 342.883 230.58 l 345.15 258.3 l 347.417 233.1 l 349.684 265.86 l 351.951 286.02 l 354.218 245.7 l 356.484 250.74 l 358.751 280.98 l 361.018 280.98 l 363.285 215.46 l 365.552 260.82 l 367.819 278.46 l 370.086 293.58 l 372.353 240.66 l 374.619 296.1 l 376.886 260.82 l 379.153 280.98 l 381.42 280.98 l 383.687 283.5 l 385.954 278.46 l 388.221 291.06 l 390.488 286.02 l 392.754 273.42 l 395.021 265.86 l 397.288 278.46 l 399.555 212.94 l 401.822 286.02 l 404.089 235.62 l 406.356 278.46 l 408.623 283.5 l 410.889 268.38 l 413.156 240.66 l 415.423 318.78 l 417.69 283.5 l 419.957 323.82 l 422.224 303.66 l 424.491 323.82 l 426.758 306.18 l 429.024 333.9 l 431.291 303.66 l 433.558 318.78 l 435.825 328.86 l 438.092 323.82 l 440.359 313.74 l 442.626 296.1 l 444.893 280.98 l 447.159 326.34 l 449.426 308.7 l 451.693 316.26 l 453.96 341.46 l 456.227 308.7 l 458.494 316.26 l 460.761 253.26 l 463.028 308.7 l 465.294 323.82 l 467.561 331.38 l 469.828 349.02 l 472.095 291.06 l 474.362 293.58 l 476.629 311.22 l 478.896 331.38 l 481.163 321.3 l 483.429 308.7 l 485.696 318.78 l 487.963 371.7 l 490.23 288.54 l 492.497 343.98 l 494.764 298.62 l 497.031 331.38 l 499.298 354.06 l 501.564 323.82 l 503.831 321.3 l 506.098 354.06 l 508.365 343.98 l 510.632 354.06 l 512.899 311.22 l 515.166 326.34 l 517.433 291.06 l 519.699 364.14 l 521.966 326.34 l 524.233 333.9 l 524.233 333.9 l stroke grestore 0.500 setlinewidth 0 setlinecap [1 3] 0 setdash 0.000 setgray gsave 453.4 352.8 73.12 44.1 clipbox 73.125 44.1 m 73.125 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 396.9 o grestore /DejaVuSans findfont 12.000 scalefont setfont gsave 62.500000 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /two glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 186.469 44.1 m 186.469 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 186.469 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 186.469 396.9 o grestore gsave 175.843750 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /two glyphshow 7.634766 0.000000 m /five glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 299.813 44.1 m 299.813 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 299.813 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 299.813 396.9 o grestore gsave 289.210938 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /three glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 413.156 44.1 m 413.156 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 413.156 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 413.156 396.9 o grestore gsave 402.554688 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /three glyphshow 7.634766 0.000000 m /five glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 526.5 44.1 m 526.5 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 396.9 o grestore gsave 515.734375 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /four glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore gsave 282.531250 14.350000 translate 0.000000 rotate 0.000000 0.000000 m /E glyphshow 7.582031 0.000000 m /p glyphshow 15.199219 0.000000 m /o glyphshow 22.541016 0.000000 m /c glyphshow 29.138672 0.000000 m /h glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 44.1 m 526.5 44.1 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 44.1 o grestore gsave 44.031250 40.787500 translate 0.000000 rotate 0.000000 0.000000 m /eight glyphshow 7.634766 0.000000 m /five glyphshow 15.269531 0.000000 m /period glyphshow 19.083984 0.000000 m /eight glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 94.5 m 526.5 94.5 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 94.5 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 94.5 o grestore gsave 44.000000 91.187500 translate 0.000000 rotate 0.000000 0.000000 m /eight glyphshow 7.634766 0.000000 m /six glyphshow 15.269531 0.000000 m /period glyphshow 19.083984 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 144.9 m 526.5 144.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 144.9 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 144.9 o grestore gsave 44.406250 141.587500 translate 0.000000 rotate 0.000000 0.000000 m /eight glyphshow 7.634766 0.000000 m /six glyphshow 15.269531 0.000000 m /period glyphshow 19.083984 0.000000 m /two glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 195.3 m 526.5 195.3 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 195.3 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 195.3 o grestore gsave 43.875000 191.987500 translate 0.000000 rotate 0.000000 0.000000 m /eight glyphshow 7.634766 0.000000 m /six glyphshow 15.269531 0.000000 m /period glyphshow 19.083984 0.000000 m /four glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 245.7 m 526.5 245.7 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 245.7 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 245.7 o grestore gsave 43.968750 242.387500 translate 0.000000 rotate 0.000000 0.000000 m /eight glyphshow 7.634766 0.000000 m /six glyphshow 15.269531 0.000000 m /period glyphshow 19.083984 0.000000 m /six glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 296.1 m 526.5 296.1 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 296.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 296.1 o grestore gsave 44.031250 292.787500 translate 0.000000 rotate 0.000000 0.000000 m /eight glyphshow 7.634766 0.000000 m /six glyphshow 15.269531 0.000000 m /period glyphshow 19.083984 0.000000 m /eight glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 346.5 m 526.5 346.5 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 346.5 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 346.5 o grestore gsave 44.000000 343.187500 translate 0.000000 rotate 0.000000 0.000000 m /eight glyphshow 7.634766 0.000000 m /seven glyphshow 15.269531 0.000000 m /period glyphshow 19.083984 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 396.9 m 526.5 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 396.9 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 396.9 o grestore gsave 44.406250 393.587500 translate 0.000000 rotate 0.000000 0.000000 m /eight glyphshow 7.634766 0.000000 m /seven glyphshow 15.269531 0.000000 m /period glyphshow 19.083984 0.000000 m /two glyphshow grestore 1.000 setlinewidth gsave 73.125 396.9 m 526.5 396.9 l stroke grestore gsave 526.5 44.1 m 526.5 396.9 l stroke grestore gsave 73.125 44.1 m 526.5 44.1 l stroke grestore gsave 73.125 44.1 m 73.125 396.9 l stroke grestore /DejaVuSans findfont 14.400 scalefont setfont gsave 193.015625 401.900000 translate 0.000000 rotate 0.000000 0.000000 m /A glyphshow 9.594360 0.000000 m /c glyphshow 17.506393 0.000000 m /c glyphshow 25.418427 0.000000 m /u glyphshow 34.539047 0.000000 m /r glyphshow 40.455505 0.000000 m /a glyphshow 49.273972 0.000000 m /c glyphshow 57.186005 0.000000 m /y glyphshow 65.702332 0.000000 m /space glyphshow 70.276688 0.000000 m /parenleft glyphshow 75.890991 0.000000 m /percent glyphshow 89.564896 0.000000 m /parenright glyphshow 95.179199 0.000000 m /space glyphshow 99.753555 0.000000 m /o glyphshow 108.557968 0.000000 m /n glyphshow 117.678589 0.000000 m /space glyphshow 122.252945 0.000000 m /t glyphshow 127.895355 0.000000 m /h glyphshow 137.015976 0.000000 m /e glyphshow 145.869583 0.000000 m /space glyphshow 150.443939 0.000000 m /t glyphshow 156.086349 0.000000 m /e glyphshow 164.939957 0.000000 m /s glyphshow 172.437408 0.000000 m /t glyphshow 178.079819 0.000000 m /space glyphshow 182.654175 0.000000 m /d glyphshow 191.788849 0.000000 m /a glyphshow 200.607315 0.000000 m /t glyphshow 206.249725 0.000000 m /a glyphshow grestore end showpage ```
/content/code_sandbox/images/regularized2.eps
postscript
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
13,625
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{circuits.logic.US,positioning,decorations.pathreplacing,math} \begin{document} \begin{tikzpicture}[ circuit logic US, large circuit symbols, contact/.style={circle, fill=black, minimum size=4pt, inner sep=0pt} ] \matrix [column sep=1cm,row sep=2mm] { & \node [nand gate] (n1) {}; & \\ \node [nand gate] (n2) {}; & & \node [nand gate] (sum) {}; \\ & \node [nand gate] (n3) {}; & \\ & & \node [nand gate] (carry) {}; \\ }; \node (x1) [left=of n2,yshift=8mm] {$x_1$}; \node (x2) [left=of n2,yshift=-8mm] {$x_2$}; \node (text1) [right=of sum] {sum: $x_1 \oplus x_2$}; \node (text2) [right=of carry] {carry bit: $x_1x_2$}; % connections: \draw (x1.east) -- ++(right:5mm) node [contact] (x1split) {} |- (n1.input 1); \draw (x1split) |- (n2.input 1); \draw (x2.east) -- ++(right:5mm) node [contact] (x2split) {} |- (n2.input 2); \draw (x2split) |- (n3.input 2); \draw (n2.output) -- ++(right:5mm) node [contact] (split1) [] {} |- (n1.input 2); \draw (split1 |- n3.input 1) node[contact] (split2) {} -- (n3.input 1); \draw (split2 |- carry.input 1) node[contact] (split3) {} -- (carry.input 1); \draw (split1) -- (split2) -- (split3) |- (carry.input 2); \draw (n1.output) -- ++(right:5mm) |- (sum.input 1); \draw (n3.output) -- ++(right:5mm) |- (sum.input 2); \draw (sum.output) -- (text1.west); \draw (carry.output) -- (text2.west); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz3.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
617
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=8mm} ] % input label: \node (input) at (-4.5, 0) {input}; % leftmost perceptrons: \node (pl1) at (-2.25, 1.25) [neuron] {}; \node (pl2) at (-2.25, 0) [neuron] {}; \node (pl3) at (-2.25, -1.25) [neuron] {}; % middle perceptrons: \node (pm1) at (0, 1.875) [neuron] {}; \node (pm2) at (0, 0.625) [neuron] {}; \node (pm3) at (0, -0.625) [neuron] {}; \node (pm4) at (0, -1.875) [neuron] {}; % rightmost perceptron: \node (pr) at (2.25, 0) [neuron] {}; % output: \node (output) at (4.5, 0) {\ output}; % connect nodes: \draw [->] (-4, 1.5) to (pl1); \draw [->] (-4, 1.5) to (pl2); \draw [->] (-4, 1.5) to (pl3); \draw [->] (-4, 0.75) to (pl1); \draw [->] (-4, 0.75) to (pl2); \draw [->] (-4, 0.75) to (pl3); \draw [->] (-4, 0) to (pl1); \draw [->] (-4, 0) to (pl2); \draw [->] (-4, 0) to (pl3); \draw [->] (-4, -0.75) to (pl1); \draw [->] (-4, -0.75) to (pl2); \draw [->] (-4, -0.75) to (pl3); \draw [->] (-4, -1.5) to (pl1); \draw [->] (-4, -1.5) to (pl2); \draw [->] (-4, -1.5) to (pl3); \draw [->] (pl1) to (pm1); \draw [->] (pl1) to (pm2); \draw [->] (pl1) to (pm3); \draw [->] (pl1) to (pm4); \draw [->] (pl2) to (pm1); \draw [->] (pl2) to (pm2); \draw [->] (pl2) to (pm3); \draw [->] (pl2) to (pm4); \draw [->] (pl3) to (pm1); \draw [->] (pl3) to (pm2); \draw [->] (pl3) to (pm3); \draw [->] (pl3) to (pm4); \draw [->] (pm1) to (pr); \draw [->] (pm2) to (pr); \draw [->] (pm3) to (pr); \draw [->] (pm4) to (pr); \draw [->] (pr) to (output); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz1.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
859
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \crossEntropyCostLearning{2.0}{2.0}{0.005}{50} \end{document} ```
/content/code_sandbox/images/saturation4-50.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```unknown # Makefile to generate pdfs from tikz pictures TEX := xelatex RM := rm -f TARGETS := $(patsubst %.tex,%.pdf,$(wildcard *.tex)) .PHONY: clean all: $(TARGETS) ../plots.tex %.pdf: %.tex $(TEX) $(basename $<) clean: $(RM) *.pdf $(RM) *.aux $(RM) *.log ```
/content/code_sandbox/images/Makefile
unknown
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
100
```postscript %!PS-Adobe-3.0 EPSF-3.0 %%Creator: (MATLAB, The Mathworks, Inc. Version 8.6.0.267246 \(R2015b\). Operating System: Mac OS X) %%Title: /Users/zhanggyb/Workspace/github/nndl/images/simple_model.eps %%CreationDate: 2016-01-30T20:22:54 %%Pages: (atend) %%BoundingBox: 0 0 560 420 %%LanguageLevel: 2 %%EndComments %%BeginProlog %%BeginResource: procset (Apache XML Graphics Std ProcSet) 1.2 0 %%Version: 1.2 0 /bd{bind def}bind def /ld{load def}bd /GR/grestore ld /M/moveto ld /LJ/setlinejoin ld /C/curveto ld /f/fill ld /LW/setlinewidth ld /GC/setgray ld /t/show ld /N/newpath ld /CT/concat ld /cp/closepath ld /S/stroke ld /L/lineto ld /CC/setcmykcolor ld /A/ashow ld /GS/gsave ld /RC/setrgbcolor ld /RM/rmoveto ld /ML/setmiterlimit ld /re {4 2 roll M 1 index 0 rlineto 0 exch rlineto neg 0 rlineto cp } bd /_ctm matrix def /_tm matrix def /BT { _ctm currentmatrix pop matrix _tm copy pop 0 0 moveto } bd /ET { _ctm setmatrix } bd /iTm { _ctm setmatrix _tm concat } bd /Tm { _tm astore pop iTm 0 0 moveto } bd /ux 0.0 def /uy 0.0 def /F { /Tp exch def /Tf exch def Tf findfont Tp scalefont setfont /cf Tf def /cs Tp def } bd /ULS {currentpoint /uy exch def /ux exch def} bd /ULE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add moveto Tcx uy To add lineto Tt setlinewidth stroke grestore } bd /OLE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add cs add moveto Tcx uy To add cs add lineto Tt setlinewidth stroke grestore } bd /SOE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add cs 10 mul 26 idiv add moveto Tcx uy To add cs 10 mul 26 idiv add lineto Tt setlinewidth stroke grestore } bd /QT { /Y22 exch store /X22 exch store /Y21 exch store /X21 exch store currentpoint /Y21 load 2 mul add 3 div exch /X21 load 2 mul add 3 div exch /X21 load 2 mul /X22 load add 3 div /Y21 load 2 mul /Y22 load add 3 div /X22 load /Y22 load curveto } bd /SSPD { dup length /d exch dict def { /v exch def /k exch def currentpagedevice k known { /cpdv currentpagedevice k get def v cpdv ne { /upd false def /nullv v type /nulltype eq def /nullcpdv cpdv type /nulltype eq def nullv nullcpdv or { /upd true def } { /sametype v type cpdv type eq def sametype { v type /arraytype eq { /vlen v length def /cpdvlen cpdv length def vlen cpdvlen eq { 0 1 vlen 1 sub { /i exch def /obj v i get def /cpdobj cpdv i get def obj cpdobj ne { /upd true def exit } if } for } { /upd true def } ifelse } { v type /dicttype eq { v { /dv exch def /dk exch def /cpddv cpdv dk get def dv cpddv ne { /upd true def exit } if } forall } { /upd true def } ifelse } ifelse } if } ifelse upd true eq { d k v put } if } if } if } forall d length 0 gt { d setpagedevice } if } bd %%EndResource %%BeginResource: procset (Apache XML Graphics EPS ProcSet) 1.0 0 %%Version: 1.0 0 /BeginEPSF { %def /b4_Inc_state save def % Save state for cleanup /dict_count countdictstack def % Count objects on dict stack /op_count count 1 sub def % Count objects on operand stack userdict begin % Push userdict on dict stack /showpage { } def % Redefine showpage, { } = null proc 0 setgray 0 setlinecap % Prepare graphics state 1 setlinewidth 0 setlinejoin 10 setmiterlimit [ ] 0 setdash newpath /languagelevel where % If level not equal to 1 then {pop languagelevel % set strokeadjust and 1 ne % overprint to their defaults. {false setstrokeadjust false setoverprint } if } if } bd /EndEPSF { %def count op_count sub {pop} repeat % Clean up stacks countdictstack dict_count sub {end} repeat b4_Inc_state restore } bd %%EndResource %FOPBeginFontDict %%IncludeResource: font Courier-Bold %%IncludeResource: font Helvetica %%IncludeResource: font Courier-BoldOblique %%IncludeResource: font Courier-Oblique %%IncludeResource: font Times-Roman %%IncludeResource: font Helvetica-BoldOblique %%IncludeResource: font Helvetica-Bold %%IncludeResource: font Helvetica-Oblique %%IncludeResource: font Times-BoldItalic %%IncludeResource: font Courier %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Bold %%IncludeResource: font Symbol %%IncludeResource: font ZapfDingbats %FOPEndFontDict %%BeginResource: encoding WinAnsiEncoding /WinAnsiEncoding [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /bullet /Euro /bullet /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /bullet /Zcaron /bullet /bullet /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /asciitilde /trademark /scaron /guilsinglright /oe /bullet /zcaron /Ydieresis /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /sfthyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /middot /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndResource %FOPBeginFontReencode /Courier-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-Bold exch definefont pop /Helvetica findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica exch definefont pop /Courier-BoldOblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-BoldOblique exch definefont pop /Courier-Oblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-Oblique exch definefont pop /Times-Roman findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Roman exch definefont pop /Helvetica-BoldOblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-BoldOblique exch definefont pop /Helvetica-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-Bold exch definefont pop /Helvetica-Oblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-Oblique exch definefont pop /Times-BoldItalic findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-BoldItalic exch definefont pop /Courier findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier exch definefont pop /Times-Italic findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Italic exch definefont pop /Times-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Bold exch definefont pop %FOPEndFontReencode %%EndProlog %%Page: 1 1 %%PageBoundingBox: 0 0 560 420 %%BeginPageSetup [1 0 0 -1 0 420] CT %%EndPageSetup GS 1 GC N 0 0 560 420 re f GR GS 1 GC N 0 0 560 420 re f GR GS 1 GC N 73 374 M 507 374 L 507 31 L 73 31 L cp f GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 507 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 507 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 73 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 121.222 374 M 121.222 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 169.444 374 M 169.444 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 217.667 374 M 217.667 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 265.889 374 M 265.889 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 314.111 374 M 314.111 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 362.333 374 M 362.333 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 410.556 374 M 410.556 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 458.778 374 M 458.778 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 507 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 73 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 121.222 31 M 121.222 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 169.444 31 M 169.444 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 217.667 31 M 217.667 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 265.889 31 M 265.889 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 314.111 31 M 314.111 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 362.333 31 M 362.333 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 410.556 31 M 410.556 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 458.778 31 M 458.778 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 31 M 507 35.34 L S GR GS [1 0 0 1 73 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (0.5) t GR GR GS [1 0 0 1 121.22222 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (1) t GR GR GS [1 0 0 1 169.44444 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (1.5) t GR GR GS [1 0 0 1 217.66667 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (2) t GR GR GS [1 0 0 1 265.88889 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (2.5) t GR GR GS [1 0 0 1 314.11111 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (3) t GR GR GS [1 0 0 1 362.33334 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (3.5) t GR GR GS [1 0 0 1 410.55554 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (4) t GR GR GS [1 0 0 1 458.77777 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (4.5) t GR GR GS [1 0 0 1 507 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (5) t GR GR GS [1 0 0 1 284 401] CT 0.149 GC /Helvetica-BoldItalic 12 F GS [1 0 0 1 0 0] CT 0 0 moveto 1 -1 scale ( x) t GR GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 73 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 507 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 77.34 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 325 M 77.34 325 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 276 M 77.34 276 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 227 M 77.34 227 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 178 M 77.34 178 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 129 M 77.34 129 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 80 M 77.34 80 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 77.34 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 502.66 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 325 M 502.66 325 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 276 M 502.66 276 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 227 M 502.66 227 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 178 M 502.66 178 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 129 M 502.66 129 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 80 M 502.66 80 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 31 M 502.66 31 L S GR GS [1 0 0 1 68.8 374] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (2) t GR GR GS [1 0 0 1 68.8 325] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (3) t GR GR GS [1 0 0 1 68.8 276] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (4) t GR GR GS [1 0 0 1 68.8 227] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (5) t GR GR GS [1 0 0 1 68.8 178] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (6) t GR GR GS [1 0 0 1 68.8 129] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (7) t GR GR GS [1 0 0 1 68.8 80] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (8) t GR GR GS [1 0 0 1 68.8 31] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (9) t GR GR GS [0 -1 1 0 56 208] CT 0.149 GC /Helvetica-BoldItalic 12 F GS [1 0 0 1 0 0] CT 0 0 moveto 1 -1 scale ( y) t GR GR GS [1 0 0 1 118.99658 348.95557] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 167.96068 333.71112] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 216.92479 265.11111] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 274.04959 227] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 298.53165 185.07777] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 355.6564 150.77779] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 371.97778 135.53333] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 384.21878 112.66666] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 420.94186 70.74446] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 461.7453 36.44442] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR %%Trailer %%Pages: 1 %%EOF ```
/content/code_sandbox/images/simple_model.eps
postscript
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
7,593
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ axis x line=middle, axis y line=left, ymin=-2.2, ymax=2.2, xmax=1.1, xlabel=$x$, xtick distance=1, declare function={ sigma(\z) = 1/(1 + exp(-\z)); f(\x,\h,\s,\e) = \h * (sigma(300 * (\x - \s)) - sigma(300 * (\x - \e))); }] \addplot[red!50,thick,domain=0.0:0.22,samples=51] { f(x, -1.3/2, 0.0, 0.2) }; \addplot[green!50,thick,domain=0.18:0.42,samples=51] { f(x, -1.8/2, 0.2, 0.4) }; \addplot[blue!50,thick,domain=0.38:0.62,samples=51] { f(x, -0.5/2, 0.4, 0.6) }; \addplot[violet!50,thick,domain=0.58:0.82,samples=51] { f(x, -0.9/2, 0.6, 0.8) }; \addplot[orange!50,thick,domain=0.78:0.99,samples=51] { f(x, 0.3/2, 0.8, 1.0) }; \end{axis} \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/half_bumps.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
442
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage{pgfplots} \usetikzlibrary{positioning} \input{../plots} \begin{document} \createTiGraphSurf{8}{-5} \end{document} ```
/content/code_sandbox/images/ti_graph-0.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
83
```postscript %!PS-Adobe-3.0 EPSF-3.0 %%Title: /home/zhanggyb/figure_3.eps %%Creator: matplotlib version 1.3.1, path_to_url %%CreationDate: Wed Mar 16 10:50:25 2016 %%Orientation: portrait %%BoundingBox: 13 175 598 616 %%EndComments %%BeginProlog /mpldict 8 dict def mpldict begin /m { moveto } bind def /l { lineto } bind def /r { rlineto } bind def /c { curveto } bind def /cl { closepath } bind def /box { m 1 index 0 r 0 exch r neg 0 r cl } bind def /clipbox { box clip newpath } bind def %!PS-Adobe-3.0 Resource-Font %%Title: DejaVu Sans %%Creator: Converted from TrueType to type 3 by PPR 25 dict begin /_d{bind def}bind def /_m{moveto}_d /_l{lineto}_d /_cl{closepath eofill}_d /_c{curveto}_d /_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d /_e{exec}_d /FontName /DejaVuSans def /PaintType 0 def /FontMatrix[.001 0 0 .001 0 0]def /FontBBox[-1021 -415 1681 1167]def /FontType 3 def /Encoding [ /space /hyphen /zero /one /two /three /four /five /six /colon /H /N /S /a /b /c /d /e /f /g /h /i /l /m /n /o /p /r /s /t /u /y ] def /FontInfo 10 dict dup begin /FamilyName (DejaVu Sans) def /FullName (DejaVu Sans) def /Weight (Book) def /Version (Version 2.34) def /ItalicAngle 0.0 def /isFixedPitch false def /UnderlinePosition -130 def /UnderlineThickness 90 def end readonly def /CharStrings 32 dict dup begin /space{318 0 0 0 0 0 _sc }_d /hyphen{361 0 49 234 312 314 _sc 49 314 _m 312 314 _l 312 234 _l 49 234 _l 49 314 _l _cl}_d /zero{636 0 66 -13 570 742 _sc 318 664 _m 267 664 229 639 203 589 _c 177 539 165 464 165 364 _c 165 264 177 189 203 139 _c 229 89 267 64 318 64 _c 369 64 407 89 433 139 _c 458 189 471 264 471 364 _c 471 464 458 539 433 589 _c 407 639 369 664 318 664 _c 318 742 _m 399 742 461 709 505 645 _c 548 580 570 486 570 364 _c 570 241 548 147 505 83 _c 461 19 399 -13 318 -13 _c 236 -13 173 19 130 83 _c 87 147 66 241 66 364 _c 66 486 87 580 130 645 _c 173 709 236 742 318 742 _c _cl}_d /one{636 0 110 0 544 729 _sc 124 83 _m 285 83 _l 285 639 _l 110 604 _l 110 694 _l 284 729 _l 383 729 _l 383 83 _l 544 83 _l 544 0 _l 124 0 _l 124 83 _l _cl}_d /two{{636 0 73 0 536 742 _sc 192 83 _m 536 83 _l 536 0 _l 73 0 _l 73 83 _l 110 121 161 173 226 239 _c 290 304 331 346 348 365 _c 380 400 402 430 414 455 _c 426 479 433 504 433 528 _c 433 566 419 598 392 622 _c 365 646 330 659 286 659 _c 255 659 222 653 188 643 _c 154 632 117 616 78 594 _c 78 694 _l 118 710 155 722 189 730 _c 223 738 255 742 284 742 _c }_e{359 742 419 723 464 685 _c 509 647 532 597 532 534 _c 532 504 526 475 515 449 _c 504 422 484 390 454 354 _c 446 344 420 317 376 272 _c 332 227 271 164 192 83 _c _cl}_e}_d /three{{636 0 76 -13 556 742 _sc 406 393 _m 453 383 490 362 516 330 _c 542 298 556 258 556 212 _c 556 140 531 84 482 45 _c 432 6 362 -13 271 -13 _c 240 -13 208 -10 176 -4 _c 144 1 110 10 76 22 _c 76 117 _l 103 101 133 89 166 81 _c 198 73 232 69 268 69 _c 330 69 377 81 409 105 _c 441 129 458 165 458 212 _c 458 254 443 288 413 312 _c 383 336 341 349 287 349 _c }_e{202 349 _l 202 430 _l 291 430 _l 339 430 376 439 402 459 _c 428 478 441 506 441 543 _c 441 580 427 609 401 629 _c 374 649 336 659 287 659 _c 260 659 231 656 200 650 _c 169 644 135 635 98 623 _c 98 711 _l 135 721 170 729 203 734 _c 235 739 266 742 296 742 _c 370 742 429 725 473 691 _c 517 657 539 611 539 553 _c 539 513 527 479 504 451 _c 481 423 448 403 406 393 _c _cl}_e}_d /four{636 0 49 0 580 729 _sc 378 643 _m 129 254 _l 378 254 _l 378 643 _l 352 729 _m 476 729 _l 476 254 _l 580 254 _l 580 172 _l 476 172 _l 476 0 _l 378 0 _l 378 172 _l 49 172 _l 49 267 _l 352 729 _l _cl}_d /five{{636 0 77 -13 549 729 _sc 108 729 _m 495 729 _l 495 646 _l 198 646 _l 198 467 _l 212 472 227 476 241 478 _c 255 480 270 482 284 482 _c 365 482 429 459 477 415 _c 525 370 549 310 549 234 _c 549 155 524 94 475 51 _c 426 8 357 -13 269 -13 _c 238 -13 207 -10 175 -6 _c 143 -1 111 6 77 17 _c 77 116 _l 106 100 136 88 168 80 _c 199 72 232 69 267 69 _c }_e{323 69 368 83 401 113 _c 433 143 450 183 450 234 _c 450 284 433 324 401 354 _c 368 384 323 399 267 399 _c 241 399 214 396 188 390 _c 162 384 135 375 108 363 _c 108 729 _l _cl}_e}_d /six{{636 0 70 -13 573 742 _sc 330 404 _m 286 404 251 388 225 358 _c 199 328 186 286 186 234 _c 186 181 199 139 225 109 _c 251 79 286 64 330 64 _c 374 64 409 79 435 109 _c 461 139 474 181 474 234 _c 474 286 461 328 435 358 _c 409 388 374 404 330 404 _c 526 713 _m 526 623 _l 501 635 476 644 451 650 _c 425 656 400 659 376 659 _c 310 659 260 637 226 593 _c }_e{192 549 172 482 168 394 _c 187 422 211 444 240 459 _c 269 474 301 482 336 482 _c 409 482 467 459 509 415 _c 551 371 573 310 573 234 _c 573 159 550 99 506 54 _c 462 9 403 -13 330 -13 _c 246 -13 181 19 137 83 _c 92 147 70 241 70 364 _c 70 479 97 571 152 639 _c 206 707 280 742 372 742 _c 396 742 421 739 447 735 _c 472 730 498 723 526 713 _c _cl}_e}_d /colon{337 0 117 0 220 517 _sc 117 124 _m 220 124 _l 220 0 _l 117 0 _l 117 124 _l 117 517 _m 220 517 _l 220 393 _l 117 393 _l 117 517 _l _cl}_d /H{752 0 98 0 654 729 _sc 98 729 _m 197 729 _l 197 430 _l 555 430 _l 555 729 _l 654 729 _l 654 0 _l 555 0 _l 555 347 _l 197 347 _l 197 0 _l 98 0 _l 98 729 _l _cl}_d /N{748 0 98 0 650 729 _sc 98 729 _m 231 729 _l 554 119 _l 554 729 _l 650 729 _l 650 0 _l 517 0 _l 194 610 _l 194 0 _l 98 0 _l 98 729 _l _cl}_d /S{{635 0 66 -13 579 742 _sc 535 705 _m 535 609 _l 497 627 462 640 429 649 _c 395 657 363 662 333 662 _c 279 662 237 651 208 631 _c 179 610 165 580 165 542 _c 165 510 174 485 194 469 _c 213 452 250 439 304 429 _c 364 417 _l 437 403 491 378 526 343 _c 561 307 579 260 579 201 _c 579 130 555 77 508 41 _c 460 5 391 -13 300 -13 _c 265 -13 228 -9 189 -2 _c }_e{150 5 110 16 69 32 _c 69 134 _l 109 111 148 94 186 83 _c 224 71 262 66 300 66 _c 356 66 399 77 430 99 _c 460 121 476 152 476 194 _c 476 230 465 258 443 278 _c 421 298 385 313 335 323 _c 275 335 _l 201 349 148 372 115 404 _c 82 435 66 478 66 534 _c 66 598 88 649 134 686 _c 179 723 242 742 322 742 _c 356 742 390 739 426 733 _c 461 727 497 717 535 705 _c }_e{_cl}_e}_d /a{{613 0 60 -13 522 560 _sc 343 275 _m 270 275 220 266 192 250 _c 164 233 150 205 150 165 _c 150 133 160 107 181 89 _c 202 70 231 61 267 61 _c 317 61 357 78 387 114 _c 417 149 432 196 432 255 _c 432 275 _l 343 275 _l 522 312 _m 522 0 _l 432 0 _l 432 83 _l 411 49 385 25 355 10 _c 325 -5 287 -13 243 -13 _c 187 -13 142 2 109 33 _c 76 64 60 106 60 159 _c }_e{60 220 80 266 122 298 _c 163 329 224 345 306 345 _c 432 345 _l 432 354 _l 432 395 418 427 391 450 _c 364 472 326 484 277 484 _c 245 484 215 480 185 472 _c 155 464 127 453 100 439 _c 100 522 _l 132 534 164 544 195 550 _c 226 556 256 560 286 560 _c 365 560 424 539 463 498 _c 502 457 522 395 522 312 _c _cl}_e}_d /b{{635 0 91 -13 580 760 _sc 487 273 _m 487 339 473 390 446 428 _c 418 466 381 485 334 485 _c 286 485 249 466 222 428 _c 194 390 181 339 181 273 _c 181 207 194 155 222 117 _c 249 79 286 61 334 61 _c 381 61 418 79 446 117 _c 473 155 487 207 487 273 _c 181 464 _m 199 496 223 520 252 536 _c 281 552 316 560 356 560 _c 422 560 476 533 518 481 _c 559 428 580 359 580 273 _c }_e{580 187 559 117 518 65 _c 476 13 422 -13 356 -13 _c 316 -13 281 -5 252 10 _c 223 25 199 49 181 82 _c 181 0 _l 91 0 _l 91 760 _l 181 760 _l 181 464 _l _cl}_e}_d /c{{550 0 55 -13 488 560 _sc 488 526 _m 488 442 _l 462 456 437 466 411 473 _c 385 480 360 484 334 484 _c 276 484 230 465 198 428 _c 166 391 150 339 150 273 _c 150 206 166 154 198 117 _c 230 80 276 62 334 62 _c 360 62 385 65 411 72 _c 437 79 462 90 488 104 _c 488 21 _l 462 9 436 0 410 -5 _c 383 -10 354 -13 324 -13 _c 242 -13 176 12 128 64 _c }_e{79 115 55 185 55 273 _c 55 362 79 432 128 483 _c 177 534 244 560 330 560 _c 358 560 385 557 411 551 _c 437 545 463 537 488 526 _c _cl}_e}_d /d{{635 0 55 -13 544 760 _sc 454 464 _m 454 760 _l 544 760 _l 544 0 _l 454 0 _l 454 82 _l 435 49 411 25 382 10 _c 353 -5 319 -13 279 -13 _c 213 -13 159 13 117 65 _c 75 117 55 187 55 273 _c 55 359 75 428 117 481 _c 159 533 213 560 279 560 _c 319 560 353 552 382 536 _c 411 520 435 496 454 464 _c 148 273 _m 148 207 161 155 188 117 _c 215 79 253 61 301 61 _c }_e{348 61 385 79 413 117 _c 440 155 454 207 454 273 _c 454 339 440 390 413 428 _c 385 466 348 485 301 485 _c 253 485 215 466 188 428 _c 161 390 148 339 148 273 _c _cl}_e}_d /e{{615 0 55 -13 562 560 _sc 562 296 _m 562 252 _l 149 252 _l 153 190 171 142 205 110 _c 238 78 284 62 344 62 _c 378 62 412 66 444 74 _c 476 82 509 95 541 113 _c 541 28 _l 509 14 476 3 442 -3 _c 408 -9 373 -13 339 -13 _c 251 -13 182 12 131 62 _c 80 112 55 181 55 268 _c 55 357 79 428 127 481 _c 175 533 241 560 323 560 _c 397 560 455 536 498 489 _c }_e{540 441 562 377 562 296 _c 472 322 _m 471 371 457 410 431 440 _c 404 469 368 484 324 484 _c 274 484 234 469 204 441 _c 174 413 156 373 152 322 _c 472 322 _l _cl}_e}_d /f{352 0 23 0 371 760 _sc 371 760 _m 371 685 _l 285 685 _l 253 685 230 678 218 665 _c 205 652 199 629 199 595 _c 199 547 _l 347 547 _l 347 477 _l 199 477 _l 199 0 _l 109 0 _l 109 477 _l 23 477 _l 23 547 _l 109 547 _l 109 585 _l 109 645 123 690 151 718 _c 179 746 224 760 286 760 _c 371 760 _l _cl}_d /g{{635 0 55 -207 544 560 _sc 454 280 _m 454 344 440 395 414 431 _c 387 467 349 485 301 485 _c 253 485 215 467 188 431 _c 161 395 148 344 148 280 _c 148 215 161 165 188 129 _c 215 93 253 75 301 75 _c 349 75 387 93 414 129 _c 440 165 454 215 454 280 _c 544 68 _m 544 -24 523 -93 482 -139 _c 440 -184 377 -207 292 -207 _c 260 -207 231 -204 203 -200 _c 175 -195 147 -188 121 -178 _c }_e{121 -91 _l 147 -105 173 -115 199 -122 _c 225 -129 251 -133 278 -133 _c 336 -133 380 -117 410 -87 _c 439 -56 454 -10 454 52 _c 454 96 _l 435 64 411 40 382 24 _c 353 8 319 0 279 0 _c 211 0 157 25 116 76 _c 75 127 55 195 55 280 _c 55 364 75 432 116 483 _c 157 534 211 560 279 560 _c 319 560 353 552 382 536 _c 411 520 435 496 454 464 _c 454 547 _l 544 547 _l }_e{544 68 _l _cl}_e}_d /h{634 0 91 0 549 760 _sc 549 330 _m 549 0 _l 459 0 _l 459 327 _l 459 379 448 417 428 443 _c 408 469 378 482 338 482 _c 289 482 251 466 223 435 _c 195 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 760 _l 181 760 _l 181 462 _l 202 494 227 519 257 535 _c 286 551 320 560 358 560 _c 420 560 468 540 500 501 _c 532 462 549 405 549 330 _c _cl}_d /i{278 0 94 0 184 760 _sc 94 547 _m 184 547 _l 184 0 _l 94 0 _l 94 547 _l 94 760 _m 184 760 _l 184 646 _l 94 646 _l 94 760 _l _cl}_d /l{278 0 94 0 184 760 _sc 94 760 _m 184 760 _l 184 0 _l 94 0 _l 94 760 _l _cl}_d /m{{974 0 91 0 889 560 _sc 520 442 _m 542 482 569 511 600 531 _c 631 550 668 560 711 560 _c 767 560 811 540 842 500 _c 873 460 889 403 889 330 _c 889 0 _l 799 0 _l 799 327 _l 799 379 789 418 771 444 _c 752 469 724 482 686 482 _c 639 482 602 466 575 435 _c 548 404 535 362 535 309 _c 535 0 _l 445 0 _l 445 327 _l 445 379 435 418 417 444 _c 398 469 369 482 331 482 _c }_e{285 482 248 466 221 435 _c 194 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 201 495 226 520 255 536 _c 283 552 317 560 357 560 _c 397 560 430 550 458 530 _c 486 510 506 480 520 442 _c _cl}_e}_d /n{634 0 91 0 549 560 _sc 549 330 _m 549 0 _l 459 0 _l 459 327 _l 459 379 448 417 428 443 _c 408 469 378 482 338 482 _c 289 482 251 466 223 435 _c 195 404 181 362 181 309 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 202 494 227 519 257 535 _c 286 551 320 560 358 560 _c 420 560 468 540 500 501 _c 532 462 549 405 549 330 _c _cl}_d /o{612 0 55 -13 557 560 _sc 306 484 _m 258 484 220 465 192 427 _c 164 389 150 338 150 273 _c 150 207 163 156 191 118 _c 219 80 257 62 306 62 _c 354 62 392 80 420 118 _c 448 156 462 207 462 273 _c 462 337 448 389 420 427 _c 392 465 354 484 306 484 _c 306 560 _m 384 560 445 534 490 484 _c 534 433 557 363 557 273 _c 557 183 534 113 490 63 _c 445 12 384 -13 306 -13 _c 227 -13 165 12 121 63 _c 77 113 55 183 55 273 _c 55 363 77 433 121 484 _c 165 534 227 560 306 560 _c _cl}_d /p{{635 0 91 -207 580 560 _sc 181 82 _m 181 -207 _l 91 -207 _l 91 547 _l 181 547 _l 181 464 _l 199 496 223 520 252 536 _c 281 552 316 560 356 560 _c 422 560 476 533 518 481 _c 559 428 580 359 580 273 _c 580 187 559 117 518 65 _c 476 13 422 -13 356 -13 _c 316 -13 281 -5 252 10 _c 223 25 199 49 181 82 _c 487 273 _m 487 339 473 390 446 428 _c 418 466 381 485 334 485 _c }_e{286 485 249 466 222 428 _c 194 390 181 339 181 273 _c 181 207 194 155 222 117 _c 249 79 286 61 334 61 _c 381 61 418 79 446 117 _c 473 155 487 207 487 273 _c _cl}_e}_d /r{411 0 91 0 411 560 _sc 411 463 _m 401 469 390 473 378 476 _c 366 478 353 480 339 480 _c 288 480 249 463 222 430 _c 194 397 181 350 181 288 _c 181 0 _l 91 0 _l 91 547 _l 181 547 _l 181 462 _l 199 495 224 520 254 536 _c 284 552 321 560 365 560 _c 371 560 378 559 386 559 _c 393 558 401 557 411 555 _c 411 463 _l _cl}_d /s{{521 0 54 -13 472 560 _sc 443 531 _m 443 446 _l 417 458 391 468 364 475 _c 336 481 308 485 279 485 _c 234 485 200 478 178 464 _c 156 450 145 430 145 403 _c 145 382 153 366 169 354 _c 185 342 217 330 265 320 _c 296 313 _l 360 299 405 279 432 255 _c 458 230 472 195 472 151 _c 472 100 452 60 412 31 _c 372 1 316 -13 246 -13 _c 216 -13 186 -10 154 -5 _c }_e{122 0 89 8 54 20 _c 54 113 _l 87 95 120 82 152 74 _c 184 65 216 61 248 61 _c 290 61 323 68 346 82 _c 368 96 380 117 380 144 _c 380 168 371 187 355 200 _c 339 213 303 226 247 238 _c 216 245 _l 160 257 119 275 95 299 _c 70 323 58 356 58 399 _c 58 450 76 490 112 518 _c 148 546 200 560 268 560 _c 301 560 332 557 362 552 _c 391 547 418 540 443 531 _c }_e{_cl}_e}_d /t{392 0 27 0 368 702 _sc 183 702 _m 183 547 _l 368 547 _l 368 477 _l 183 477 _l 183 180 _l 183 135 189 106 201 94 _c 213 81 238 75 276 75 _c 368 75 _l 368 0 _l 276 0 _l 206 0 158 13 132 39 _c 106 65 93 112 93 180 _c 93 477 _l 27 477 _l 27 547 _l 93 547 _l 93 702 _l 183 702 _l _cl}_d /u{634 0 85 -13 543 560 _sc 85 216 _m 85 547 _l 175 547 _l 175 219 _l 175 167 185 129 205 103 _c 225 77 255 64 296 64 _c 344 64 383 79 411 110 _c 439 141 453 183 453 237 _c 453 547 _l 543 547 _l 543 0 _l 453 0 _l 453 84 _l 431 50 405 26 377 10 _c 348 -5 315 -13 277 -13 _c 214 -13 166 6 134 45 _c 101 83 85 140 85 216 _c 311 560 _m 311 560 _l _cl}_d /y{592 0 30 -207 562 547 _sc 322 -50 _m 296 -114 271 -157 247 -177 _c 223 -197 191 -207 151 -207 _c 79 -207 _l 79 -132 _l 132 -132 _l 156 -132 175 -126 189 -114 _c 203 -102 218 -75 235 -31 _c 251 9 _l 30 547 _l 125 547 _l 296 119 _l 467 547 _l 562 547 _l 322 -50 _l _cl}_d end readonly def /BuildGlyph {exch begin CharStrings exch 2 copy known not{pop /.notdef}if true 3 1 roll get exec end}_d /BuildChar { 1 index /Encoding get exch get 1 index /BuildGlyph get exec }_d FontName currentdict end definefont pop end %%EndProlog mpldict begin 13.5 175.5 translate 585 441 0 0 clipbox gsave 0 0 m 585 0 l 585 441 l 0 441 l cl 1.000 setgray fill grestore gsave 73.125 44.1 m 526.5 44.1 l 526.5 396.9 l 73.125 396.9 l cl 1.000 setgray fill grestore 1.000 setlinewidth 1 setlinejoin 2 setlinecap [] 0 setdash 0.165 0.431 0.651 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 248.343 m 74.0318 238.409 l 75.8452 223.674 l 77.6587 211.379 l 79.4723 200.692 l 81.2858 191.136 l 84.006 178.261 l 86.7262 166.709 l 89.4465 156.359 l 91.26 150.181 l 93.0735 144.653 l 94.887 139.838 l 96.7005 135.772 l 98.514 132.444 l 100.328 129.795 l 102.141 127.732 l 103.954 126.147 l 105.768 124.936 l 107.582 124.009 l 109.395 123.296 l 112.115 122.508 l 114.835 121.947 l 118.463 121.413 l 123.903 120.859 l 132.971 120.199 l 156.546 118.798 l 306.16 110.293 l 525.593 97.87 l 525.593 97.87 l stroke grestore 1.000 0.663 0.200 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 292.965 m 74.0318 283.712 l 75.8452 268.334 l 77.6587 255.624 l 79.4723 244.722 l 81.2858 234.985 l 84.006 221.765 l 86.7262 209.666 l 89.4465 198.43 l 92.1668 188.011 l 94.887 178.492 l 96.7005 172.721 l 98.514 167.471 l 100.328 162.787 l 102.141 158.697 l 103.954 155.205 l 105.768 152.287 l 107.582 149.897 l 109.395 147.972 l 111.209 146.44 l 113.022 145.234 l 114.835 144.289 l 116.649 143.551 l 119.369 142.732 l 122.09 142.16 l 125.716 141.64 l 130.25 141.219 l 137.504 140.791 l 152.919 140.175 l 246.314 136.914 l 456.68 129.727 l 525.593 127.441 l 525.593 127.441 l stroke grestore 1.000 0.333 0.333 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 328.823 m 74.0318 322.212 l 78.5655 293.83 l 80.379 283.959 l 83.0992 270.53 l 85.8195 258.227 l 88.5397 246.761 l 91.26 236.048 l 93.9802 226.13 l 96.7005 217.131 l 98.514 211.719 l 100.328 206.828 l 102.141 202.488 l 103.954 198.714 l 105.768 195.498 l 107.582 192.811 l 109.395 190.607 l 111.209 188.828 l 113.022 187.411 l 114.835 186.296 l 116.649 185.424 l 118.463 184.747 l 121.183 184.007 l 123.903 183.502 l 127.53 183.065 l 132.971 182.694 l 141.131 182.413 l 159.266 182.079 l 268.983 180.464 l 437.639 178.178 l 525.593 177.066 l 525.593 177.066 l stroke grestore 0.333 1.000 0.333 setrgbcolor gsave 453.4 352.8 73.12 44.1 clipbox 73.125 364.857 m 74.0318 357.419 l 74.9385 352.985 l 76.752 342.261 l 79.4723 326.435 l 82.1925 312.409 l 84.9128 299.671 l 87.633 287.853 l 90.3533 276.81 l 93.0735 266.543 l 95.7938 257.146 l 98.514 248.768 l 100.328 243.825 l 102.141 239.438 l 103.954 235.621 l 105.768 232.371 l 107.582 229.659 l 109.395 227.44 l 111.209 225.656 l 113.022 224.242 l 114.835 223.136 l 116.649 222.28 l 118.463 221.621 l 121.183 220.913 l 123.903 220.443 l 127.53 220.054 l 132.971 219.755 l 141.131 219.58 l 160.173 219.468 l 351.497 218.939 l 525.593 218.502 l 525.593 218.502 l stroke grestore 0.500 setlinewidth 0 setlinecap [1 3] 0 setdash 0.000 setgray gsave 453.4 352.8 73.12 44.1 clipbox 73.125 44.1 m 73.125 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 396.9 o grestore /DejaVuSans findfont 12.000 scalefont setfont gsave 70.101562 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 163.8 44.1 m 163.8 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 163.8 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 163.8 396.9 o grestore gsave 153.393750 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /one glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 254.475 44.1 m 254.475 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 254.475 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 254.475 396.9 o grestore gsave 243.850000 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /two glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 345.15 44.1 m 345.15 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 345.15 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 345.15 396.9 o grestore gsave 334.548438 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /three glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 435.825 44.1 m 435.825 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 435.825 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 435.825 396.9 o grestore gsave 425.059375 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /four glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 526.5 44.1 m 526.5 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 0 -4 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 396.9 o grestore gsave 515.898438 30.975000 translate 0.000000 rotate 0.000000 0.000000 m /five glyphshow 7.634766 0.000000 m /zero glyphshow 15.269531 0.000000 m /zero glyphshow grestore gsave 212.398438 14.350000 translate 0.000000 rotate 0.000000 0.000000 m /N glyphshow 8.976562 0.000000 m /u glyphshow 16.582031 0.000000 m /m glyphshow 28.271484 0.000000 m /b glyphshow 35.888672 0.000000 m /e glyphshow 43.271484 0.000000 m /r glyphshow 48.205078 0.000000 m /space glyphshow 52.019531 0.000000 m /o glyphshow 59.361328 0.000000 m /f glyphshow 63.585938 0.000000 m /space glyphshow 67.400391 0.000000 m /e glyphshow 74.783203 0.000000 m /p glyphshow 82.400391 0.000000 m /o glyphshow 89.742188 0.000000 m /c glyphshow 96.339844 0.000000 m /h glyphshow 103.945312 0.000000 m /s glyphshow 110.197266 0.000000 m /space glyphshow 114.011719 0.000000 m /o glyphshow 121.353516 0.000000 m /f glyphshow 125.578125 0.000000 m /space glyphshow 129.392578 0.000000 m /t glyphshow 134.097656 0.000000 m /r glyphshow 139.031250 0.000000 m /a glyphshow 146.384766 0.000000 m /i glyphshow 149.718750 0.000000 m /n glyphshow 157.324219 0.000000 m /i glyphshow 160.658203 0.000000 m /n glyphshow 168.263672 0.000000 m /g glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 44.1 m 526.5 44.1 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 44.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 44.1 o grestore gsave 44.125000 39.100000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.828125 moveto /one glyphshow 7.634766 0.828125 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.765625 moveto /hyphen glyphshow 18.300586 7.765625 moveto /six glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 102.9 m 526.5 102.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 102.9 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 102.9 o grestore gsave 44.125000 97.900000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.937500 moveto /one glyphshow 7.634766 0.937500 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.875000 moveto /hyphen glyphshow 18.300586 7.875000 moveto /five glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 161.7 m 526.5 161.7 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 161.7 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 161.7 o grestore gsave 44.125000 156.700000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.937500 moveto /one glyphshow 7.634766 0.937500 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.875000 moveto /hyphen glyphshow 18.300586 7.875000 moveto /four glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 220.5 m 526.5 220.5 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 220.5 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 220.5 o grestore gsave 44.125000 215.500000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.828125 moveto /one glyphshow 7.634766 0.828125 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.765625 moveto /hyphen glyphshow 18.300586 7.765625 moveto /three glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 279.3 m 526.5 279.3 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 279.3 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 279.3 o grestore gsave 44.125000 274.300000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.828125 moveto /one glyphshow 7.634766 0.828125 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.765625 moveto /hyphen glyphshow 18.300586 7.765625 moveto /two glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 338.1 m 526.5 338.1 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 338.1 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 338.1 o grestore gsave 44.125000 333.100000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.937500 moveto /one glyphshow 7.634766 0.937500 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.875000 moveto /hyphen glyphshow 18.300586 7.875000 moveto /one glyphshow grestore [1 3] 0 setdash gsave 453.4 352.8 73.12 44.1 clipbox 73.125 396.9 m 526.5 396.9 l stroke grestore [] 0 setdash gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 396.9 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -4 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 396.9 o grestore gsave 47.125000 391.900000 translate 0.000000 rotate /DejaVuSans findfont 12.0 scalefont setfont 0.000000 0.828125 moveto /one glyphshow 7.634766 0.828125 moveto /zero glyphshow /DejaVuSans findfont 8.4 scalefont setfont 15.269531 7.765625 moveto /zero glyphshow grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 61.8006 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 61.8006 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 72.1547 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 72.1547 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 79.5011 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 79.5011 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 85.1994 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 85.1994 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 89.8553 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 89.8553 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 93.7918 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 93.7918 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 97.2017 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 97.2017 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 100.209 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 100.209 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 120.601 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 120.601 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 130.955 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 130.955 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 138.301 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 138.301 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 143.999 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 143.999 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 148.655 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 148.655 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 152.592 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 152.592 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 156.002 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 156.002 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 159.009 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 159.009 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 179.401 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 179.401 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 189.755 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 189.755 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 197.101 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 197.101 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 202.799 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 202.799 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 207.455 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 207.455 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 211.392 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 211.392 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 214.802 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 214.802 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 217.809 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 217.809 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 238.201 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 238.201 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 248.555 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 248.555 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 255.901 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 255.901 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 261.599 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 261.599 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 266.255 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 266.255 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 270.192 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 270.192 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 273.602 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 273.602 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 276.609 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 276.609 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 297.001 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 297.001 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 307.355 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 307.355 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 314.701 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 314.701 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 320.399 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 320.399 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 325.055 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 325.055 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 328.992 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 328.992 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 332.402 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 332.402 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 335.409 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 335.409 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 355.801 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 355.801 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 366.155 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 366.155 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 373.501 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 373.501 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 379.199 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 379.199 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 383.855 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 383.855 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 387.792 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 387.792 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 391.202 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 391.202 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m 2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 73.125 394.209 o grestore gsave /o { gsave newpath translate 0.5 setlinewidth 1 setlinejoin 0 setlinecap 0 0 m -2 0 l gsave 0.000 setgray fill grestore stroke grestore } bind def 526.5 394.209 o grestore 1.000 setlinewidth gsave 73.125 396.9 m 526.5 396.9 l stroke grestore gsave 526.5 44.1 m 526.5 396.9 l stroke grestore gsave 73.125 44.1 m 526.5 44.1 l stroke grestore gsave 73.125 44.1 m 73.125 396.9 l stroke grestore /DejaVuSans findfont 14.400 scalefont setfont gsave 176.500000 401.900000 translate 0.000000 rotate 0.000000 0.000000 m /S glyphshow 9.134674 0.000000 m /p glyphshow 18.269348 0.000000 m /e glyphshow 27.122955 0.000000 m /e glyphshow 35.976562 0.000000 m /d glyphshow 45.111237 0.000000 m /space glyphshow 49.685593 0.000000 m /o glyphshow 58.490005 0.000000 m /f glyphshow 63.556229 0.000000 m /space glyphshow 68.130585 0.000000 m /l glyphshow 72.128754 0.000000 m /e glyphshow 80.982361 0.000000 m /a glyphshow 89.800827 0.000000 m /r glyphshow 95.467285 0.000000 m /n glyphshow 104.587906 0.000000 m /i glyphshow 108.586075 0.000000 m /n glyphshow 117.706696 0.000000 m /g glyphshow 126.841370 0.000000 m /colon glyphshow 131.689774 0.000000 m /space glyphshow 136.264130 0.000000 m /four glyphshow 145.419876 0.000000 m /space glyphshow 149.994232 0.000000 m /h glyphshow 159.114853 0.000000 m /i glyphshow 163.113022 0.000000 m /d glyphshow 172.247696 0.000000 m /d glyphshow 181.382370 0.000000 m /e glyphshow 190.235977 0.000000 m /n glyphshow 199.356598 0.000000 m /space glyphshow 203.930954 0.000000 m /l glyphshow 207.929123 0.000000 m /a glyphshow 216.747589 0.000000 m /y glyphshow 225.263916 0.000000 m /e glyphshow 234.117523 0.000000 m /r glyphshow 240.033981 0.000000 m /s glyphshow grestore gsave 362.866 302.393 m 519.3 302.393 l 519.3 389.7 l 362.866 389.7 l 362.866 302.393 l cl gsave 1.000 setgray fill grestore stroke grestore 2 setlinecap 0.165 0.431 0.651 setrgbcolor gsave 372.946 378.339 m 393.106 378.339 l stroke grestore 0.000 setgray gsave 408.946250 373.299375 translate 0.000000 rotate 0.000000 0.000000 m /H glyphshow 10.821075 0.000000 m /i glyphshow 14.819244 0.000000 m /d glyphshow 23.953918 0.000000 m /d glyphshow 33.088593 0.000000 m /e glyphshow 41.942200 0.000000 m /n glyphshow 51.062820 0.000000 m /space glyphshow 55.637177 0.000000 m /l glyphshow 59.635345 0.000000 m /a glyphshow 68.453812 0.000000 m /y glyphshow 76.970139 0.000000 m /e glyphshow 85.823746 0.000000 m /r glyphshow 91.740204 0.000000 m /space glyphshow 96.314560 0.000000 m /one glyphshow grestore 1.000 0.663 0.200 setrgbcolor gsave 372.946 357.593 m 393.106 357.593 l stroke grestore 0.000 setgray gsave 408.946250 352.552500 translate 0.000000 rotate 0.000000 0.000000 m /H glyphshow 10.821075 0.000000 m /i glyphshow 14.819244 0.000000 m /d glyphshow 23.953918 0.000000 m /d glyphshow 33.088593 0.000000 m /e glyphshow 41.942200 0.000000 m /n glyphshow 51.062820 0.000000 m /space glyphshow 55.637177 0.000000 m /l glyphshow 59.635345 0.000000 m /a glyphshow 68.453812 0.000000 m /y glyphshow 76.970139 0.000000 m /e glyphshow 85.823746 0.000000 m /r glyphshow 91.740204 0.000000 m /space glyphshow 96.314560 0.000000 m /two glyphshow grestore 1.000 0.333 0.333 setrgbcolor gsave 372.946 336.846 m 393.106 336.846 l stroke grestore 0.000 setgray gsave 408.946250 331.805625 translate 0.000000 rotate 0.000000 0.000000 m /H glyphshow 10.821075 0.000000 m /i glyphshow 14.819244 0.000000 m /d glyphshow 23.953918 0.000000 m /d glyphshow 33.088593 0.000000 m /e glyphshow 41.942200 0.000000 m /n glyphshow 51.062820 0.000000 m /space glyphshow 55.637177 0.000000 m /l glyphshow 59.635345 0.000000 m /a glyphshow 68.453812 0.000000 m /y glyphshow 76.970139 0.000000 m /e glyphshow 85.823746 0.000000 m /r glyphshow 91.740204 0.000000 m /space glyphshow 96.314560 0.000000 m /three glyphshow grestore 0.333 1.000 0.333 setrgbcolor gsave 372.946 316.099 m 393.106 316.099 l stroke grestore 0.000 setgray gsave 408.946250 311.058750 translate 0.000000 rotate 0.000000 0.000000 m /H glyphshow 10.821075 0.000000 m /i glyphshow 14.819244 0.000000 m /d glyphshow 23.953918 0.000000 m /d glyphshow 33.088593 0.000000 m /e glyphshow 41.942200 0.000000 m /n glyphshow 51.062820 0.000000 m /space glyphshow 55.637177 0.000000 m /l glyphshow 59.635345 0.000000 m /a glyphshow 68.453812 0.000000 m /y glyphshow 76.970139 0.000000 m /e glyphshow 85.823746 0.000000 m /r glyphshow 91.740204 0.000000 m /space glyphshow 96.314560 0.000000 m /four glyphshow grestore end showpage ```
/content/code_sandbox/images/training_speed_4_layers.eps
postscript
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
22,599
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{math} \begin{document} \begin{tikzpicture}[ tick/.style={font=\scriptsize} ] \draw (-6,0) -- (6,0); \foreach \x in {-30, -20, -10, 0, 10, 20, 30} \draw (\x / 5, 0) -- (\x / 5, -0.1) node[tick,below]{$\x$}; \draw (0,0) -- (0,1.8); \draw (0,1.8) -- (-0.1, 1.8) node[tick,left] {$0.02$}; \tikzmath{ % Gaussian distribution: function gaussian(\x, \m, \s) { return (1 / (sqrt(2 * pi) * \s)) * exp(- (pow(\x - \m,2)) / (2 * pow(\s, 2))); }; {\draw[blue,domain=-30:30,samples=101,xscale=0.2] plot (\x, {gaussian(\x, 0, 22.4) * 90});}; } \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/wide_gaussian.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
324
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \crossEntropyCostLearning{2.0}{2.0}{0.005}{200} \end{document} ```
/content/code_sandbox/images/saturation4-200.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \node (x1) at (-6, 1.2) [neuron] {$x_1$}; \node (x2) at (-6, -1.2) [neuron] {$x_2$}; \node (pl1) at (-4, 0) [neuron] {}; \node (pm1) at (-2, 1.2) [neuron] {}; \node (pm2) at (-2, -1.2) [neuron] {}; \node (pm3) at (-2, -2.5) [neuron] {}; \node (pr1) at (0, 0) [neuron] {}; \node (sum) at (2.5, 0) {\ sum: $x_1 \oplus x_2$}; \node (carrybit) at (2.5, -2.5) {\ carry bit: $x_1x_2$}; \draw [->] (x1) to (pl1); \draw [->] (x2) to (pl1); \draw [->] (x1) to (pm1); \draw [->] (x2) to (pm2); \draw [->] (pl1) to (pm1); \draw [->] (pl1) to (pm2); \draw [->] (pl1) to node [below,xshift=-2mm] {$-4$} (pm3); \draw [->] (pm1) to (pr1); \draw [->] (pm2) to (pr1); \draw [->] (pr1) to (sum); \draw [->] (pm3) to (carrybit); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz6.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
480
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \quadraticCostLearning{2.0}{2.0}{0.15}{250} \end{document} ```
/content/code_sandbox/images/saturation2-250.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{calc,positioning} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=8mm}, font=\footnotesize ] \node(l0) [neuron] {}; \node(m0) [neuron,right=1.5 of l0] {}; \node(m1) [neuron,above=0.6 of m0] {}; \node(m2) [neuron,above=0.6 of m1] {}; \node(m3) [neuron,above=0.6 of m2] {}; \node(l2) [neuron,left=1.5 of m3] {}; \node(r0) [neuron,right=1.5 of m0] {}; \node(r2) [neuron,right=1.5 of m3] {}; \coordinate (lc) at ($(l0)!0.5!(l2)$); \node(l1) at (lc) [neuron] {}; \coordinate (rc) at ($(r0)!0.5!(r2)$); \node(r1) at (rc) [neuron] {}; \foreach \x in {0,1,2} \node(tl\x) [left=0.1 of l\x] {$\ldots$}; \foreach \x in {0,1,2} \node(tr\x) [right=0.1 of r\x] {$\ldots$}; \node (n0) [neuron,right=5 of m1] {}; \node (n1) [neuron,right=5 of m2] {}; \coordinate (nc) at ($(n0)!0.5!(n1)$); \node (c) [right=1.5 of nc] {$C$}; \node(tn0) [left=0.1 of n0] {$\ldots$}; \node(tn1) [left=0.1 of n1] {$\ldots$}; % connections: \foreach \x in {0,1,2} \foreach \y in {0,...,3} \draw[->] (l\x) to (m\y); \foreach \x in {0,...,3} \foreach \y in {0,1,2} \draw[->] (m\x) to (r\y); \draw[->] (n0) to (c); \draw[->] (n1) to (c); % mark: \coordinate (p) at ($(l1)!0.5!(m3)$); \draw[->,very thick,blue] (p) to (m3); \draw[->,very thick,blue] (m3) to (r0); \draw[->,very thick,blue] (m3) to (r1); \draw[->,very thick,blue] (m3) to (r2); \draw[->,very thick,blue] (n0) to (c); \draw[->,very thick,blue] (n1) to (c); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz25.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
769
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{calc,positioning} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=8mm}, font=\footnotesize ] \node(l0) [neuron] {}; \node(m0) [neuron,right=1.5 of l0] {}; \node(m1) [neuron,above=0.6 of m0] {}; \node(m2) [neuron,above=0.6 of m1] {}; \node(m3) [neuron,above=0.6 of m2] {}; \node(l2) [neuron,left=1.5 of m3] {}; \node(r0) [neuron,right=1.5 of m0] {}; \node(r2) [neuron,right=1.5 of m3] {}; \coordinate (lc) at ($(l0)!0.5!(l2)$); \node(l1) at (lc) [neuron] {}; \coordinate (rc) at ($(r0)!0.5!(r2)$); \node(r1) at (rc) [neuron] {}; \foreach \x in {0,1,2} \node(tl\x) [left=0.1 of l\x] {$\ldots$}; \foreach \x in {0,1,2} \node(tr\x) [right=0.1 of r\x] {$\ldots$}; \node (n0) [neuron,right=5 of m1] {}; \node (n1) [neuron,right=5 of m2] {}; \coordinate (nc) at ($(n0)!0.5!(n1)$); \node (c) [right=1.5 of nc] {$C$}; \node(tn0) [left=0.1 of n0] {$\ldots$}; \node(tn1) [left=0.1 of n1] {$\ldots$}; % connections: \foreach \x in {0,1,2} \foreach \y in {0,...,3} \draw[->] (l\x) to (m\y); \foreach \x in {0,...,3} \foreach \y in {0,1,2} \draw[->] (m\x) to (r\y); \draw[->] (n0) to (c); \draw[->] (n1) to (c); % mark: \coordinate (p) at ($(l1)!0.5!(m3)$); \node(t) [blue,above=1.5 of p] {$\Delta w^l_{jk}$}; \draw[->,very thick,blue] (t) to (p); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz22.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
692
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \begin{document} \begin{tikzpicture}[ tick/.style={font=\footnotesize} ] \draw (-5,0) -- (5,0) node [right] {Z}; \foreach \x in {-4, -3, -2, -1, 0, 1, 2, 3, 4} \draw (\x, 0) -- (\x, -0.15) node[tick,below]{$\x$}; %\draw (-5, 0) -- (-5, -0.1); \draw (5, 0) -- (5, -0.15); \draw (-5,-3) -- (-5,3); \foreach \y in {-1.0, -0.5, 0.0, 0.5, 1.0} \draw (-5, \y * 3) -- (-5-0.15, \y * 3) node[tick,left]{$\y$}; \draw (0, 3) node[above] {tanh function}; \draw[blue,thick,domain=-10:10,xscale=0.5,samples=101] plot (\x, {6 * (1 + tanh(\x/2))/2 - 3}); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tanh_function.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
350
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{calc,positioning} \usepackage{pgfplots} \usepackage{cjkfonts} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \begin{scope} \node (l0) [neuron] {$x$}; \node (m0) [neuron,right=of l0,yshift=-1.5cm] {}; \node (m1) [neuron,right=of l0,yshift=1.5cm] {}; \node (r0) [neuron,right=of m0,yshift=1.5cm] {}; \draw[->] (r0) -- ++(1,0); \draw[->] (l0) to (m0); \draw[->] (l0) to node (w) [blue,above,xshift=-0.5cm] {$w = 100$} (m1); \draw[->] (m0) to (r0); \draw[->] (m1) to (r0); \node(b) [blue,above] at (m1.north) {$b = -40$}; \end{scope} \begin{scope}[xshift=6cm] \begin{axis}[ width=5.6cm, height=5.6cm, xlabel={\normalsize $-b/w = 0.40$}, axis lines=left, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, xtick distance=1, ytick distance=1, xmax=1.1, ymax=1.1, title={} ] \draw[gray] (axis cs:0.4,0) -- (axis cs:0.4,1.0); \draw[gray] (axis cs:0,1) -- (axis cs:1,1); \addplot[ orange, thick, domain=0:1, samples=101 ] { 1/(1 + exp(-(100 * x + (-40)))) }; \end{axis} \end{scope} \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/step.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
566
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{decorations.pathreplacing} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=8mm} ] % left layers: \foreach \y in {0,...,2} \node (l\y) at (0, \y * 1.875 + 2 * 1.25) [neuron] {}; % middle layers: \foreach \y in {0,2,5} \node (m\y) at (2.25, \y * 1.25 + 1 * 1.25) [neuron] {}; \foreach \y in {1,3,4} \node (m\y) at (2.25, \y * 1.25 + 1 * 1.25) [neuron,dotted] {}; % right layer: \node (r0) at (4.5, 5) [neuron] {}; \node (r1) at (4.5, 3.75) [neuron] {}; % connections: \foreach \x in {0,...,2} \foreach \y in {0,2,5} \draw [->] (l\x) to (m\y); \foreach \x in {0,...,2} \foreach \y in {1,3,4} \draw [dotted,->] (l\x) to (m\y); \foreach \x in {0,2,5} \foreach \y in {0,1} \draw [->] (m\x) to (r\y); \foreach \x in {1,3,4} \foreach \y in {0,1} \draw [dotted,->] (m\x) to (r\y); \draw[->] (r0) -- ++(1,0); \draw[->] (r1) -- ++(1,0); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz31.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
510
```postscript %!PS-Adobe-3.0 EPSF-3.0 %%Creator: (MATLAB, The Mathworks, Inc. Version 8.6.0.267246 \(R2015b\). Operating System: Mac OS X) %%Title: /Users/zhanggyb/Workspace/github/nndl/images/linear_fit.eps %%CreationDate: 2016-01-30T20:29:15 %%Pages: (atend) %%BoundingBox: 0 0 560 420 %%LanguageLevel: 2 %%EndComments %%BeginProlog %%BeginResource: procset (Apache XML Graphics Std ProcSet) 1.2 0 %%Version: 1.2 0 /bd{bind def}bind def /ld{load def}bd /GR/grestore ld /M/moveto ld /LJ/setlinejoin ld /C/curveto ld /f/fill ld /LW/setlinewidth ld /GC/setgray ld /t/show ld /N/newpath ld /CT/concat ld /cp/closepath ld /S/stroke ld /L/lineto ld /CC/setcmykcolor ld /A/ashow ld /GS/gsave ld /RC/setrgbcolor ld /RM/rmoveto ld /ML/setmiterlimit ld /re {4 2 roll M 1 index 0 rlineto 0 exch rlineto neg 0 rlineto cp } bd /_ctm matrix def /_tm matrix def /BT { _ctm currentmatrix pop matrix _tm copy pop 0 0 moveto } bd /ET { _ctm setmatrix } bd /iTm { _ctm setmatrix _tm concat } bd /Tm { _tm astore pop iTm 0 0 moveto } bd /ux 0.0 def /uy 0.0 def /F { /Tp exch def /Tf exch def Tf findfont Tp scalefont setfont /cf Tf def /cs Tp def } bd /ULS {currentpoint /uy exch def /ux exch def} bd /ULE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add moveto Tcx uy To add lineto Tt setlinewidth stroke grestore } bd /OLE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add cs add moveto Tcx uy To add cs add lineto Tt setlinewidth stroke grestore } bd /SOE { /Tcx currentpoint pop def gsave newpath cf findfont cs scalefont dup /FontMatrix get 0 get /Ts exch def /FontInfo get dup /UnderlinePosition get Ts mul /To exch def /UnderlineThickness get Ts mul /Tt exch def ux uy To add cs 10 mul 26 idiv add moveto Tcx uy To add cs 10 mul 26 idiv add lineto Tt setlinewidth stroke grestore } bd /QT { /Y22 exch store /X22 exch store /Y21 exch store /X21 exch store currentpoint /Y21 load 2 mul add 3 div exch /X21 load 2 mul add 3 div exch /X21 load 2 mul /X22 load add 3 div /Y21 load 2 mul /Y22 load add 3 div /X22 load /Y22 load curveto } bd /SSPD { dup length /d exch dict def { /v exch def /k exch def currentpagedevice k known { /cpdv currentpagedevice k get def v cpdv ne { /upd false def /nullv v type /nulltype eq def /nullcpdv cpdv type /nulltype eq def nullv nullcpdv or { /upd true def } { /sametype v type cpdv type eq def sametype { v type /arraytype eq { /vlen v length def /cpdvlen cpdv length def vlen cpdvlen eq { 0 1 vlen 1 sub { /i exch def /obj v i get def /cpdobj cpdv i get def obj cpdobj ne { /upd true def exit } if } for } { /upd true def } ifelse } { v type /dicttype eq { v { /dv exch def /dk exch def /cpddv cpdv dk get def dv cpddv ne { /upd true def exit } if } forall } { /upd true def } ifelse } ifelse } if } ifelse upd true eq { d k v put } if } if } if } forall d length 0 gt { d setpagedevice } if } bd %%EndResource %%BeginResource: procset (Apache XML Graphics EPS ProcSet) 1.0 0 %%Version: 1.0 0 /BeginEPSF { %def /b4_Inc_state save def % Save state for cleanup /dict_count countdictstack def % Count objects on dict stack /op_count count 1 sub def % Count objects on operand stack userdict begin % Push userdict on dict stack /showpage { } def % Redefine showpage, { } = null proc 0 setgray 0 setlinecap % Prepare graphics state 1 setlinewidth 0 setlinejoin 10 setmiterlimit [ ] 0 setdash newpath /languagelevel where % If level not equal to 1 then {pop languagelevel % set strokeadjust and 1 ne % overprint to their defaults. {false setstrokeadjust false setoverprint } if } if } bd /EndEPSF { %def count op_count sub {pop} repeat % Clean up stacks countdictstack dict_count sub {end} repeat b4_Inc_state restore } bd %%EndResource %FOPBeginFontDict %%IncludeResource: font Courier-Bold %%IncludeResource: font Helvetica %%IncludeResource: font Courier-BoldOblique %%IncludeResource: font Courier-Oblique %%IncludeResource: font Times-Roman %%IncludeResource: font Helvetica-BoldOblique %%IncludeResource: font Helvetica-Bold %%IncludeResource: font Helvetica-Oblique %%IncludeResource: font Times-BoldItalic %%IncludeResource: font Courier %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Bold %%IncludeResource: font Symbol %%IncludeResource: font ZapfDingbats %FOPEndFontDict %%BeginResource: encoding WinAnsiEncoding /WinAnsiEncoding [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /bullet /Euro /bullet /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /bullet /Zcaron /bullet /bullet /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /asciitilde /trademark /scaron /guilsinglright /oe /bullet /zcaron /Ydieresis /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /sfthyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /middot /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndResource %FOPBeginFontReencode /Courier-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-Bold exch definefont pop /Helvetica findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica exch definefont pop /Courier-BoldOblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-BoldOblique exch definefont pop /Courier-Oblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier-Oblique exch definefont pop /Times-Roman findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Roman exch definefont pop /Helvetica-BoldOblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-BoldOblique exch definefont pop /Helvetica-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-Bold exch definefont pop /Helvetica-Oblique findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Helvetica-Oblique exch definefont pop /Times-BoldItalic findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-BoldItalic exch definefont pop /Courier findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Courier exch definefont pop /Times-Italic findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Italic exch definefont pop /Times-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding WinAnsiEncoding def currentdict end /Times-Bold exch definefont pop %FOPEndFontReencode %%EndProlog %%Page: 1 1 %%PageBoundingBox: 0 0 560 420 %%BeginPageSetup [1 0 0 -1 0 420] CT %%EndPageSetup GS 1 GC N 0 0 560 420 re f GR GS 1 GC N 0 0 560 420 re f GR GS 1 GC N 73 374 M 507 374 L 507 31 L 73 31 L cp f GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 507 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 507 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 73 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 116.4 374 M 116.4 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 159.8 374 M 159.8 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 203.2 374 M 203.2 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 246.6 374 M 246.6 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 290 374 M 290 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 333.4 374 M 333.4 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 376.8 374 M 376.8 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 420.2 374 M 420.2 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 463.6 374 M 463.6 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 507 369.66 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 73 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 116.4 31 M 116.4 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 159.8 31 M 159.8 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 203.2 31 M 203.2 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 246.6 31 M 246.6 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 290 31 M 290 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 333.4 31 M 333.4 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 376.8 31 M 376.8 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 420.2 31 M 420.2 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 463.6 31 M 463.6 35.34 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 31 M 507 35.34 L S GR GS [1 0 0 1 73 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (0) t GR GR GS [1 0 0 1 116.4 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (0.5) t GR GR GS [1 0 0 1 159.8 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (1) t GR GR GS [1 0 0 1 203.2 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (1.5) t GR GR GS [1 0 0 1 246.60001 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (2) t GR GR GS [1 0 0 1 290 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (2.5) t GR GR GS [1 0 0 1 333.39999 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (3) t GR GR GS [1 0 0 1 376.79999 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (3.5) t GR GR GS [1 0 0 1 420.20001 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (4) t GR GR GS [1 0 0 1 463.60001 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -8 9 moveto 1 -1 scale (4.5) t GR GR GS [1 0 0 1 507 378.20001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -3.5 9 moveto 1 -1 scale (5) t GR GR GS [1 0 0 1 284 401] CT 0.149 GC /Helvetica-BoldItalic 12 F GS [1 0 0 1 0 0] CT 0 0 moveto 1 -1 scale ( x) t GR GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 73 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 507 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 374 M 77.34 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 339.7 M 77.34 339.7 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 305.4 M 77.34 305.4 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 271.1 M 77.34 271.1 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 236.8 M 77.34 236.8 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 202.5 M 77.34 202.5 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 168.2 M 77.34 168.2 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 133.9 M 77.34 133.9 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 99.6 M 77.34 99.6 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 65.3 M 77.34 65.3 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 73 31 M 77.34 31 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 374 M 502.66 374 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 339.7 M 502.66 339.7 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 305.4 M 502.66 305.4 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 271.1 M 502.66 271.1 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 236.8 M 502.66 236.8 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 202.5 M 502.66 202.5 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 168.2 M 502.66 168.2 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 133.9 M 502.66 133.9 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 99.6 M 502.66 99.6 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 65.3 M 502.66 65.3 L S GR GS 0.149 GC 2 setlinecap 1 LJ 0.5 LW N 507 31 M 502.66 31 L S GR GS [1 0 0 1 68.8 374] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (0) t GR GR GS [1 0 0 1 68.8 339.70001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (1) t GR GR GS [1 0 0 1 68.8 305.39999] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (2) t GR GR GS [1 0 0 1 68.8 271.10001] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (3) t GR GR GS [1 0 0 1 68.8 236.8] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (4) t GR GR GS [1 0 0 1 68.8 202.5] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (5) t GR GR GS [1 0 0 1 68.8 168.2] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (6) t GR GR GS [1 0 0 1 68.8 133.89999] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (7) t GR GR GS [1 0 0 1 68.8 99.6] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (8) t GR GR GS [1 0 0 1 68.8 65.3] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -7 3 moveto 1 -1 scale (9) t GR GR GS [1 0 0 1 68.8 31] CT 0.149 GC /Helvetica 11 F GS [1 0 0 1 0 0] CT -13 3 moveto 1 -1 scale (10) t GR GR GS [0 -1 1 0 50 208] CT 0.149 GC /Helvetica-BoldItalic 12 F GS [1 0 0 1 0 0] CT 0 0 moveto 1 -1 scale ( y) t GR GR GS [1 0 0 1 157.79692 287.8689] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 201.86461 277.19778] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 245.93231 229.17778] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 297.34464 202.5] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 319.37848 173.15445] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 370.79077 149.14445] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 385.47998 138.47333] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 396.49692 122.46666] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 429.5477 93.12112] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS [1 0 0 1 466.27078 69.1111] CT N 3.333 0 M 3.333 1.841 1.841 3.333 0 3.333 C -1.841 3.333 -3.333 1.841 -3.333 0 C -3.333 -1.841 -1.841 -3.333 0 -3.333 C 1.841 -3.333 3.333 -1.841 3.333 0 C cp f GR GS 0 0 1 RC 1 LJ 0.5 LW N 73 374 M 507 31 L S GR %%Trailer %%Pages: 1 %%EOF ```
/content/code_sandbox/images/linear_fit.eps
postscript
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
8,303
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \crossEntropyCostLearning{0.6}{0.9}{0.005}{250} \end{document} ```
/content/code_sandbox/images/saturation3-250.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage{pgfplots} \usetikzlibrary{positioning} \input{../plots} \begin{document} \createTiGraphSurf{50}{-5} \end{document} ```
/content/code_sandbox/images/ti_graph-1.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
83
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{calc,positioning} \usepackage{pgfplots} \usepackage{cjkfonts} \begin{document} \begin{tikzpicture} \begin{axis}[ width=7cm, height=7cm, xlabel={\normalsize $x$}, axis lines=center, tick label style={font=\tiny}, label style={font=\tiny}, title style={font=\scriptsize}, xtick={1}, ytick={-2,-1,0,1,2}, % minor tick num=1, title={$\sigma^{-1} \circ f(x)$}, declare function={ sigmaInverse(\z)=ln(\z/(1-\z)); f(\x)=0.2+0.4*\x*\x+0.3*\x*sin(15*deg(\x))+0.05*cos(50*deg(\x)); }, ] \addplot[blue,domain=0:1,samples=201] { sigmaInverse(f(x)) }; \end{axis} \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/inverted_function_2.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
289
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{backgrounds,math} \input{../plots} \begin{document} \quadraticCostLearning{2.0}{2.0}{0.15}{50} \end{document} ```
/content/code_sandbox/images/saturation2-50.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
94
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage[default]{cjkfonts} \usetikzlibrary{calc,positioning} \input{../westernfonts} \begin{document} \begin{tikzpicture} \foreach \x in {0,...,26} \coordinate (p\x) at (\x * 0.4,0); \foreach \x in {0,...,26} \draw (p\x) -- ++(0, 1); \coordinate (layer1bottom) at (5.2,1); \coordinate (layer2top) at (5.2,0); \node(layer1) [above,rectangle,draw,minimum width=11cm,inner sep=6pt] at (layer1bottom) { }; \node(layer2) [below,rectangle,draw,minimum width=11cm,inner sep=6pt] at (layer2top) { }; \coordinate (layer2bottom) at ($ (layer2top)-(layer2.north)+(layer2.south) $); \foreach \x in {0,...,26} \draw ($ (p\x)-(layer2.north)+(layer2.south)$) -- ++(0, -1); \coordinate (layer3top) at ($ (layer2bottom)-(0,1) $); \node(layer3) [below,rectangle,draw,minimum width=11cm,inner sep=6pt] at (layer3top) { }; \node(input) [above=of layer1] { x y }; \node(output) [below=of layer3] { x.y }; \coordinate (t0) at (layer1.north); \coordinate (t1) at (layer1.north east); \coordinate (t2) at (layer1.north west); \coordinate (i0) at (input.south); \coordinate (i1) at (input.south east); \coordinate (i2) at (input.south west); \draw (i0) to (t0); \foreach \x in {0.15,0.35,0.6,0.95} \draw ($ (i0)!\x!(i1) $) to ($ (t0)!\x!(t1) $); \foreach \x in {0.15,0.35,0.6,0.95} \draw ($ (i0)!\x!(i2) $) to ($ (t0)!\x!(t2) $); \coordinate (b0) at (layer3.south); \coordinate (b1) at (layer3.south east); \coordinate (b2) at (layer3.south west); \coordinate (o0) at (output.north); \coordinate (o1) at (output.north east); \coordinate (o2) at (output.north west); \draw (b0) to (o0); \foreach \x in {0.15,0.35,0.6,0.95} \draw ($ (b0)!\x!(b1) $) to ($ (o0)!\x!(o1) $); \foreach \x in {0.15,0.35,0.6,0.95} \draw ($ (b0)!\x!(b2) $) to ($ (o0)!\x!(o2) $); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/circuit_multiplication.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
821
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \begin{document} \begin{tikzpicture}[ tick/.style={font=\footnotesize} ] \draw (-5,0) -- (5,0) node[right] {Z}; \foreach \x in {-4,...,5} \draw (\x, 0) -- (\x, -0.15) node[tick,below]{$\x$}; % \draw (-5, 0) -- (-5, -0.1); \draw (5, 0) -- (5, -0.15); \draw (-5,-4) -- (-5,4); \foreach \y in {-4,...,5} \draw (-5, \y * 4 / 5) -- (-5-0.15, \y * 4 / 5) node[tick,left]{$\y$}; \draw (-5,-4) -- (-5-0.15,-4); \draw (0, 4) node[above] {max(o,z)}; \draw[blue,thick] (-5, 0) -- (0, 0) -- (5, 4); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/max_function.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
315
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \node (perceptron) at (0, 0) [neuron] {$x_1$}; \node (output) at (2.25, 0) {}; \draw [->] (perceptron) to (output); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz7.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
144
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning,math} \input{../plots} \begin{document} \manipulateSoftmaxBars{2.5}{-1}{3.2}{-5} \end{document} ```
/content/code_sandbox/images/softmax-4.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
87
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=10mm} ] \node(n) [neuron] {}; \node(x) [neuron,left=1.25 of n,yshift=1.5cm] {$x$}; \node(y) [neuron,left=1.25 of n,yshift=-1.5cm] {$y$}; \draw[->] (x) -- node [yshift=2mm,xshift=2mm] {$w_1$} (n); \draw[->] (y) -- node [yshift=-2mm,xshift=2mm] {$w_2$} (n); \node [above] at (n.north) {$b$}; \draw[->] (n) -- ++(1cm, 0); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/two_inputs.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
263
```tex %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[11pt,tikz,border=1]{standalone} \usepackage[default]{cjkfonts} \begin{document} \begin{tikzpicture}[ neuron/.style={circle,draw,inner sep=0pt,minimum size=8mm} ] % leftmost perceptrons: \node (pl1) at (-2.25, 1.25) [neuron] {}; \node (pl2) at (-2.25, 0) [neuron] {}; \node (pl3) at (-2.25, -1.25) [neuron] {}; % middle perceptrons: \node (pm1) at (0, 1.875) [neuron] {}; \node (pm2) at (0, 0.625) [neuron] {}; \node (pm3) at (0, -0.625) [neuron] {}; \node (pm4) at (0, -1.875) [neuron] {}; % rightmost perceptron: \node (pr) at (2.25, 0) [neuron] {}; % output: \node (output) at (5.5, 0) {\ $output + \Delta output$}; \node (weight) at (-1.125, 2.5) {$w + \Delta w$}; % connect nodes: \draw [->] (pl1) to (pm1); \draw [->] (pl1) to (pm2); \draw [->] (pl1) to (pm3); \draw [->] (pl1) to (pm4); \draw [->] (pl2) to (pm1); \draw [->] (pl2) to (pm2); \draw [->] (pl2) to (pm3); \draw [->] (pl2) to (pm4); \draw [->] (pl3) to (pm1); \draw [->] (pl3) to (pm2); \draw [->] (pl3) to (pm3); \draw [->] (pl3) to (pm4); \draw [->] (pm1) to (pr); \draw [->] (pm2) to (pr); \draw [->] (pm3) to (pr); \draw [->] (pm4) to (pr); \draw [->] (pr) to (output); \draw (weight) -- node [above] { \begin{tabular}{c} \footnotesize \\ \footnotesize \end{tabular} } (6.35, 2.5); \draw [->] (6.35, 2.5) -- (6.35, 0.25); % \draw [->] (weight) -- node (5.5, 2.5) to (output); \end{tikzpicture} \end{document} ```
/content/code_sandbox/images/tikz8.tex
tex
2016-01-20T08:40:07
2024-08-15T16:40:43
nndl
zhanggyb/nndl
1,208
704