Giter Site home page Giter Site logo

alexnet-fashionmnist's Introduction

Alexnet-fashionMNIST


๐Ÿ›  ์ฝ”๋“œ ์„ค๋ช…


Alexnet์„ ์‚ฌ์šฉํ•œ ์ฝ”๋“œ๋ฅผ ์ฒ˜์Œ ๊ตฌํ˜„ํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค. fashionMnist ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์˜€๊ณ  10๊ฐœ์˜ ๋ ˆ์ด๋ธ”์„ ๋ถ„๋ฅ˜ํ•˜๋Š” ๋ชจ๋ธ์„ ์ƒ์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ๋Š” pytorch์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ œ๊ณตํ•˜๋Š” api๋ฅผ ํ†ตํ•ด ์†์‰ฝ๊ฒŒ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. train_data 6๋งŒ๊ฐœ, test_data 3๋งŒ๊ฐœ ์ค‘ ์‹ค์ œ ๋ชจ๋ธ ํ•™์Šต ๊ณผ์ •์—์„œ๋Š” ์ ˆ๋ฐ˜๋งŒ ์‚ฌ์šฉํ•˜์—ฌ train 3๋งŒ, test 1.5๋งŒ๊ฐœ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค. 32์˜ ํฌ๊ธฐ๋กœ ๋ฏธ๋‹ˆ๋ฐฐ์น˜ ์‚ฌ์ด์ฆˆ๋ฅผ ์กฐ์ •ํ•˜์˜€๊ณ  ์•ฝ 5ํšŒ ์ •๋„์˜ ๋ฐ˜๋ณต ํšŸ์ˆ˜๊ฐ€ ๋„˜์–ด๊ฐ€๋ฉด์„œ ๊ณผ์ ํ•ฉ์ด ์กฐ๊ธˆ์”ฉ ๋ฐœ์ƒ๋˜๋Š” ๊ฒƒ์œผ๋กœ ๋ณด์•„ epoch๋Š” 7ํšŒ๋กœ ์„ค์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค. Alexnet์˜ input ์ด๋ฏธ์ง€์˜ ํฌ๊ธฐ๋“ค์€ ์ž…๋ ฅ์— ๋“ค์–ด๊ฐ€๊ธฐ์ „ ๋ชจ๋‘ image transforms์„ ์ ์šฉํ•˜์—ฌ (256,256) ํ”ฝ์…€๋กœ ๋งž์ถ˜ ๋’ค ์ค‘์•™ ๊ธฐ์ค€์œผ๋กœ cropํ•˜์—ฌ (3, 227, 227)ํฌ๊ธฐ๋กœ ์„ค์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค. optimizer์˜ ๊ฒฝ์šฐ ์ตœ๊ทผ ๊ฐ€์žฅ ์„ฑ๋Šฅ์ด ์ข‹๋‹ค๊ณ  ํ•˜๋Š” Adam์„ ์‚ฌ์šฉํ•˜์˜€๊ณ  ๊ทธ์™€ ํ•จ๊ป˜ loss function์˜ ๊ฒฝ์šฐ multi-classificationd์„ ์œ„ํ•œ crossEntropy๋ฅผ ์‚ฌ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ตœ์ข…์ ์œผ๋กœ evaluation loss: 0.25391, evaluation accuracy: 0.90540, ์•ฝ 90ํ”„๋กœ์˜ ์ •ํ™•๋„๋ฅผ ๋ณด์—ฌ์ฃผ๋ฉฐ ์ข‹์€ ๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•˜์˜€์Šต๋‹ˆ๋‹ค.


๐Ÿ™‹โ€โ™€๏ธ ๋Š๋‚€์ 


์ฒ˜์Œ์—๋Š” visual studio๋ฅผ ํ†ตํ•œ jupyter notebook์œผ๋กœ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ƒ๊ฐ๋ณด๋‹ค ์‹œ๊ฐ„์ด ์˜ค๋ž˜๊ฑธ๋ฆฌ๊ณ  ๋ณต์žกํ•œ ์ž‘์—…์ด๋ผ๋Š” ๊ฒƒ์„ ๊นจ๋‹ซ๊ณ  ์ฝ”๋žฉ์„ ํ†ตํ•ด์„œ gpu๋กœ ์ฝ”๋“œ๋ฅผ ์ž‘๋™ํ–ˆ๋Š”๋ฐ ์†๋„๊ฐ€ ํ›จ์”ฌ ํ–ฅ์ƒ๋˜๋Š” ๊ฒƒ์„ ๋Š๋‚„ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ๊นŒ์ง€ gpu๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฒŒ ํ›จ์”ฌ ์œ ๋ฆฌํ•˜๋‹ค๋Š” ๊ฒƒ์€ ์•Œ๊ณ  ์žˆ์—ˆ์ง€๋งŒ ์ด๋ ‡๊ฒŒ ์ง์ ‘ ๋น„๊ตํ•ด ๋ณผ ์ˆ˜ ์žˆ์—ˆ๋˜ ๊ฒฝํ—˜์€ ์ฒ˜์Œ์ธ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. pytorch๋ฅผ ์‚ฌ์šฉํ•œ ์ฝ”๋“œ ๊ตฌํ˜„ ๊ฒฝํ—˜์ด ์žˆ์–ด์„œ ์ƒ๊ฐ๋ณด๋‹ค ์–ด๋ ต์ง€๋Š” ์•Š์•˜์ง€๋งŒ ์ด๋ฏธ์ง€๋ฅผ ๋‹ค๋ฃจ๋‹ค๋ณด๋‹ˆ input ์ด๋ฏธ์ง€ ์ฑ„๋„ ๊ฐฏ์ˆ˜ ์กฐ์ •์„ ์ž˜๋ชปํ•ด์„œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ์‚ฌ๊ฑด์œผ๋กœ ์กฐ๊ธˆ ๋‹นํ™ฉํ•˜์˜€์Šต๋‹ˆ๋‹ค. transforms ๊ณผ์ •์—์„œ ์‚ฌ์ด์ฆˆ๋ฅผ ์ „๋ถ€ ํ†ต์ผํ•˜์—ฌ ์ž…๋ ฅํ•˜๋Š” ๋ฐฉ์‹์„ ์„ ํƒํ•˜์˜€๋Š”๋ฐ ์ด ๊ณผ์ •์—์„œ ๊ทธ๋ฆผ์—๋Š” (3, 224, 224)๋ผ๊ณ  ํ‘œํ˜„๋˜์–ด ์žˆ์ง€๋งŒ ์‹ค์ œ๋กœ ๊ณ„์‚ฐ์ด ๋งž์œผ๋ ค๋ฉด (3, 227, 227)ํฌ๊ธฐ๊ฐ€ ๋งž๋‹ค๋Š” ๊ฒƒ์„ ์ƒˆ๋กญ๊ฒŒ ์•Œ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ถ”๊ฐ€์ ์œผ๋กœ Normalize ๊ณผ์ •์„ ๊ฑฐ์น˜๋ฉด์„œ ์ˆ˜์น˜์˜ ๋ถ„์‚ฐ์„ ์ค„์—ฌ์ฃผ๋Š”๊ฒŒ ์„ฑ๋Šฅ ํ–ฅ์ƒ๊ณผ ๊ฐ€์ค‘์น˜ ์—…๋ฐ์ดํŠธ์— ์žˆ์–ด์„œ ์œ ๋ฆฌํ•˜๋‹ค๋Š” ๊ฒƒ๋„ ์ƒˆ๋กญ๊ฒŒ ๋ฐฐ์šฐ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฒ€์ƒ‰์„ ํ•˜๋ฉด์„œ ๋‹ค๋ฅธ ์ฝ”๋“œ์™€ ๋น„๊ตํ•˜๋ฉฐ Alexnet์— ๋Œ€ํ•ด์„œ ์ข€ ๋” ๊นŠ๊ฒŒ ์ƒ๊ฐํ•˜๊ณ  ๊ตฌ์กฐ๋ฅผ ์ดํ•ดํ•  ์ˆ˜ ์žˆ์—ˆ๋˜ ์‹œ๊ฐ„์ด์—ˆ๋˜ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ํ™•์‹คํžˆ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋ฉด์„œ ์‹ค์Šตํ•ด๋ณด๋‹ˆ๊นŒ ์ด๋ก ์œผ๋กœ ๋ฐฐ์šฐ๋Š” ๊ฒƒ๋ณด๋‹ค ์ „์ฒด ๊ณผ์ •์„ ํ•œ๋ฒˆ์”ฉ ๊ฒฝํ—˜ํ•ด ๋ณผ ์ˆ˜ ์žˆ์–ด์„œ ๋„ˆ๋ฌด ์ข‹์€ ์‹œ๊ฐ„์ด์—ˆ๋˜ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

alexnet-fashionmnist's People

Contributors

kimmiksik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.